aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2011-11-07 11:35:53 +0100
committerSamuel Tardieu <sam@rfc1149.net>2011-11-07 12:53:30 +0100
commit739de1c562f4814c2883459823aa46aadf26d96c (patch)
treeaeab95f3edc7b6cbb4a5a81d4f990cdb063caf85 /tests
parentc67baaf158d1102335b02defcfa445c3dda5fca0 (diff)
downloadcgeo-739de1c562f4814c2883459823aa46aadf26d96c.zip
cgeo-739de1c562f4814c2883459823aa46aadf26d96c.tar.gz
cgeo-739de1c562f4814c2883459823aa46aadf26d96c.tar.bz2
Get rid of deprecated methods related to coordinates
Diffstat (limited to 'tests')
-rw-r--r--tests/src/cgeo/geocaching/files/GPXImporterTest.java2
-rw-r--r--tests/src/cgeo/geocaching/files/GPXParserTest.java6
-rw-r--r--tests/src/cgeo/geocaching/test/mock/MockedCache.java6
3 files changed, 7 insertions, 7 deletions
diff --git a/tests/src/cgeo/geocaching/files/GPXImporterTest.java b/tests/src/cgeo/geocaching/files/GPXImporterTest.java
index f3d4a88..a664d56 100644
--- a/tests/src/cgeo/geocaching/files/GPXImporterTest.java
+++ b/tests/src/cgeo/geocaching/files/GPXImporterTest.java
@@ -23,7 +23,7 @@ public class GPXImporterTest extends InstrumentationTestCase {
private int listId;
private File tempDir;
- public void testGetWaypointsFileForGpx() {
+ public static void testGetWaypointsFileForGpx() {
assertEquals(new File("1234567-wpts.gpx"), GPXImporter.getWaypointsFileForGpx(new File("1234567.gpx")));
assertEquals(new File("/mnt/sdcard/1234567-wpts.gpx"), GPXImporter.getWaypointsFileForGpx(new File("/mnt/sdcard/1234567.gpx")));
assertEquals(new File("/mnt/sdcard/1-wpts.gpx"), GPXImporter.getWaypointsFileForGpx(new File("/mnt/sdcard/1.gpx")));
diff --git a/tests/src/cgeo/geocaching/files/GPXParserTest.java b/tests/src/cgeo/geocaching/files/GPXParserTest.java
index 0c62c7e..bc4b9d1 100644
--- a/tests/src/cgeo/geocaching/files/GPXParserTest.java
+++ b/tests/src/cgeo/geocaching/files/GPXParserTest.java
@@ -1,6 +1,5 @@
package cgeo.geocaching.files;
-import cgeo.geocaching.cgBase;
import cgeo.geocaching.cgCache;
import cgeo.geocaching.cgLog;
import cgeo.geocaching.cgWaypoint;
@@ -8,6 +7,7 @@ import cgeo.geocaching.enumerations.CacheSize;
import cgeo.geocaching.enumerations.CacheType;
import cgeo.geocaching.enumerations.WaypointType;
import cgeo.geocaching.geopoint.Geopoint;
+import cgeo.geocaching.geopoint.GeopointFormatter;
import cgeo.geocaching.test.R;
import android.content.res.Resources;
@@ -118,8 +118,8 @@ public class GPXParserTest extends InstrumentationTestCase {
assertEquals(2.0f, cache.getDifficulty().floatValue(), 0.01f);
assertEquals(1.0f, cache.getTerrain().floatValue(), 0.01f);
final Geopoint refCoordinates = new Geopoint("N 49° 19.122", "E 008° 32.739");
- assertEquals(cgBase.formatLatitude(refCoordinates.getLatitude(), true), cache.getLatitude());
- assertEquals(cgBase.formatLongitude(refCoordinates.getLongitude(), true), cache.getLongitude());
+ assertEquals(refCoordinates.format(GeopointFormatter.Format.LAT_DECMINUTE), cache.getLatitude());
+ assertEquals(refCoordinates.format(GeopointFormatter.Format.LON_DECMINUTE), cache.getLongitude());
assertEquals("vptsz", cache.getOwner());
assertEquals(CacheSize.SMALL, cache.getSize());
assertEquals(CacheType.MULTI, cache.getCacheType());
diff --git a/tests/src/cgeo/geocaching/test/mock/MockedCache.java b/tests/src/cgeo/geocaching/test/mock/MockedCache.java
index eb8cec5..d79510b 100644
--- a/tests/src/cgeo/geocaching/test/mock/MockedCache.java
+++ b/tests/src/cgeo/geocaching/test/mock/MockedCache.java
@@ -2,10 +2,10 @@ package cgeo.geocaching.test.mock;
import cgeo.geocaching.GCConstants;
import cgeo.geocaching.ICache;
-import cgeo.geocaching.cgBase;
import cgeo.geocaching.cgImage;
import cgeo.geocaching.cgTrackable;
import cgeo.geocaching.geopoint.Geopoint;
+import cgeo.geocaching.geopoint.GeopointFormatter;
import cgeo.geocaching.utils.BaseUtils;
import java.io.BufferedReader;
@@ -60,12 +60,12 @@ public abstract class MockedCache implements ICache {
@Override
public String getLatitude() {
- return cgBase.formatLatitude(coords.getLatitude(), true);
+ return coords.format(GeopointFormatter.Format.LAT_DECMINUTE);
}
@Override
public String getLongitude() {
- return cgBase.formatLongitude(coords.getLongitude(), true);
+ return coords.format(GeopointFormatter.Format.LON_DECMINUTE);
}
@Override