diff options
Diffstat (limited to 'tests/src/cgeo/geocaching/files/GPXParserTest.java')
| -rw-r--r-- | tests/src/cgeo/geocaching/files/GPXParserTest.java | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/src/cgeo/geocaching/files/GPXParserTest.java b/tests/src/cgeo/geocaching/files/GPXParserTest.java index 3754af1..47975c9 100644 --- a/tests/src/cgeo/geocaching/files/GPXParserTest.java +++ b/tests/src/cgeo/geocaching/files/GPXParserTest.java @@ -1,13 +1,12 @@ package cgeo.geocaching.files; +import cgeo.geocaching.LogEntry; import cgeo.geocaching.cgCache; -import cgeo.geocaching.cgLog; import cgeo.geocaching.cgWaypoint; 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; @@ -43,7 +42,7 @@ public class GPXParserTest extends AbstractResourceInstrumentationTestCase { assertEquals(5.0f, cache.getTerrain()); assertEquals("Baden-Württemberg, Germany", cache.getLocation()); assertEquals("Ein alter Kindheitstraum, ein Schatz auf einer unbewohnten Insel.\nA old dream of my childhood, a treasure on a lonely island.", cache.getShortdesc()); - assertTrue(new Geopoint(48.859683, 9.1874).isEqualTo(cache.getCoords())); + assertEquals(new Geopoint(48.859683, 9.1874), cache.getCoords()); return cache; } @@ -67,7 +66,7 @@ public class GPXParserTest extends AbstractResourceInstrumentationTestCase { assertEquals(4.0f, cache.getTerrain()); assertEquals("Baden-Württemberg, Germany", cache.getLocation()); assertEquals("Ein alter Kindheitstraum, ein Schatz auf einer unbewohnten Insel. A old dream of my childhood, a treasure on a lonely is", cache.getShortdesc()); - assertTrue(new Geopoint(48.85968, 9.18740).isEqualTo(cache.getCoords())); + assertEquals(new Geopoint(48.85968, 9.18740), cache.getCoords()); assertTrue(cache.isReliableLatLon()); } @@ -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()); @@ -131,7 +129,7 @@ public class GPXParserTest extends AbstractResourceInstrumentationTestCase { assertEquals("Station3: Der zerbrochene Stein zählt doppelt.\nFinal: Oben neben dem Tor", cache.getHint()); // logs assertEquals(6, cache.getLogs().size()); - final cgLog log = cache.getLogs().get(5); + final LogEntry log = cache.getLogs().get(5); assertEquals("Geoteufel", log.author); assertEquals(parseTime("2011-09-11T07:00:00Z"), log.date); assertEquals(-1, log.found); @@ -195,9 +193,8 @@ public class GPXParserTest extends AbstractResourceInstrumentationTestCase { } } - List<cgCache> cacheList = new ArrayList<cgCache>(caches); // TODO: may need to sort by geocode when a test imports more than one cache - return cacheList; + return new ArrayList<cgCache>(caches); } public static void testParseDateWithFractionalSeconds() { |
