diff options
Diffstat (limited to 'tests/src/cgeo/geocaching/files')
| -rw-r--r-- | tests/src/cgeo/geocaching/files/GPXImporterTest.java | 4 | ||||
| -rw-r--r-- | tests/src/cgeo/geocaching/files/GPXParserTest.java | 12 | ||||
| -rw-r--r-- | tests/src/cgeo/geocaching/files/LocParserTest.java | 4 |
3 files changed, 9 insertions, 11 deletions
diff --git a/tests/src/cgeo/geocaching/files/GPXImporterTest.java b/tests/src/cgeo/geocaching/files/GPXImporterTest.java index b8a3354..dc1fc71 100644 --- a/tests/src/cgeo/geocaching/files/GPXImporterTest.java +++ b/tests/src/cgeo/geocaching/files/GPXImporterTest.java @@ -8,10 +8,10 @@ import cgeo.geocaching.enumerations.LoadFlags; import cgeo.geocaching.test.AbstractResourceInstrumentationTestCase; import cgeo.geocaching.test.R; import cgeo.geocaching.utils.CancellableHandler; +import cgeo.geocaching.utils.Log; import android.net.Uri; import android.os.Message; -import android.util.Log; import java.io.File; import java.io.IOException; @@ -82,7 +82,7 @@ public class GPXImporterTest extends AbstractResourceInstrumentationTestCase { try { importThread.join(); } catch (InterruptedException e) { - Log.e(Settings.tag, "GPXImporterTest.runImportThread", e); + Log.e("GPXImporterTest.runImportThread", e); } importStepHandler.waitForCompletion(); } diff --git a/tests/src/cgeo/geocaching/files/GPXParserTest.java b/tests/src/cgeo/geocaching/files/GPXParserTest.java index 3754af1..634c551 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.cgCache; -import cgeo.geocaching.cgLog; +import cgeo.geocaching.LogEntry; 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())); + assertTrue(new Geopoint(48.859683, 9.1874).equals(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())); + assertTrue(new Geopoint(48.85968, 9.18740).equals(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); diff --git a/tests/src/cgeo/geocaching/files/LocParserTest.java b/tests/src/cgeo/geocaching/files/LocParserTest.java index 64ac7ad..ede0e81 100644 --- a/tests/src/cgeo/geocaching/files/LocParserTest.java +++ b/tests/src/cgeo/geocaching/files/LocParserTest.java @@ -37,7 +37,7 @@ public class LocParserTest extends AbstractResourceInstrumentationTestCase { assertNotNull(cache); assertEquals("OC5952", cache.getGeocode()); assertEquals("Die Schatzinsel / treasure island", cache.getName()); - assertTrue(new Geopoint(48.85968, 9.18740).isEqualTo(cache.getCoords())); + assertTrue(new Geopoint(48.85968, 9.18740).equals(cache.getCoords())); } public void testGCLoc() throws IOException, ParserException { @@ -47,7 +47,7 @@ public class LocParserTest extends AbstractResourceInstrumentationTestCase { assertNotNull(cache); assertEquals("GC1BKP3", cache.getGeocode()); assertEquals("Die Schatzinsel / treasure island", cache.getName()); - assertTrue(new Geopoint(48.859683, 9.1874).isEqualTo(cache.getCoords())); + assertTrue(new Geopoint(48.859683, 9.1874).equals(cache.getCoords())); assertEquals(1.0f, cache.getDifficulty()); assertEquals(5.0f, cache.getTerrain()); assertEquals(CacheSize.MICRO, cache.getSize()); |
