diff options
Diffstat (limited to 'tests/src')
| -rw-r--r-- | tests/src/cgeo/geocaching/cgBaseTest.java | 3 | ||||
| -rw-r--r-- | tests/src/cgeo/geocaching/files/GPXParserTest.java | 4 | ||||
| -rw-r--r-- | tests/src/cgeo/geocaching/test/mock/MockedCache.java | 11 |
3 files changed, 2 insertions, 16 deletions
diff --git a/tests/src/cgeo/geocaching/cgBaseTest.java b/tests/src/cgeo/geocaching/cgBaseTest.java index d0a7b98..eedaa83 100644 --- a/tests/src/cgeo/geocaching/cgBaseTest.java +++ b/tests/src/cgeo/geocaching/cgBaseTest.java @@ -57,8 +57,7 @@ public class cgBaseTest extends AbstractResourceInstrumentationTestCase { assertEquals(expected.isPremiumMembersOnly(), actual.isPremiumMembersOnly()); if (all) { - assertEquals(expected.getLatitude(), actual.getLatitude()); - assertEquals(expected.getLongitude(), actual.getLongitude()); + assertEquals(expected.getCoords(), actual.getCoords()); assertTrue(actual.isReliableLatLon()); assertEquals(expected.isOwn(), actual.isOwn()); assertEquals(expected.getOwnerReal(), actual.getOwnerReal()); diff --git a/tests/src/cgeo/geocaching/files/GPXParserTest.java b/tests/src/cgeo/geocaching/files/GPXParserTest.java index 3754af1..3ca8460 100644 --- a/tests/src/cgeo/geocaching/files/GPXParserTest.java +++ b/tests/src/cgeo/geocaching/files/GPXParserTest.java @@ -7,7 +7,6 @@ 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.AbstractResourceInstrumentationTestCase; import cgeo.geocaching.test.R; @@ -117,8 +116,7 @@ public class GPXParserTest extends AbstractResourceInstrumentationTestCase { assertEquals(2.0f, cache.getDifficulty(), 0.01f); assertEquals(1.0f, cache.getTerrain(), 0.01f); final Geopoint refCoordinates = new Geopoint("N 49° 19.122", "E 008° 32.739"); - assertEquals(refCoordinates.format(GeopointFormatter.Format.LAT_DECMINUTE), cache.getLatitude()); - assertEquals(refCoordinates.format(GeopointFormatter.Format.LON_DECMINUTE), cache.getLongitude()); + assertEquals(refCoordinates, cache.getCoords()); assertEquals("vptsz", cache.getOwner()); assertEquals(CacheSize.SMALL, cache.getSize()); assertEquals(CacheType.MULTI, cache.getType()); diff --git a/tests/src/cgeo/geocaching/test/mock/MockedCache.java b/tests/src/cgeo/geocaching/test/mock/MockedCache.java index 61369ee..2c717a4 100644 --- a/tests/src/cgeo/geocaching/test/mock/MockedCache.java +++ b/tests/src/cgeo/geocaching/test/mock/MockedCache.java @@ -5,7 +5,6 @@ import cgeo.geocaching.cgImage; import cgeo.geocaching.cgTrackable; import cgeo.geocaching.connector.gc.GCConstants; import cgeo.geocaching.geopoint.Geopoint; -import cgeo.geocaching.geopoint.GeopointFormatter; import cgeo.geocaching.utils.BaseUtils; import org.apache.commons.lang3.StringUtils; @@ -75,16 +74,6 @@ public abstract class MockedCache implements ICache { } @Override - public String getLatitude() { - return coords.format(GeopointFormatter.Format.LAT_DECMINUTE); - } - - @Override - public String getLongitude() { - return coords.format(GeopointFormatter.Format.LON_DECMINUTE); - } - - @Override public boolean isArchived() { return false; } |
