aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/cgeo/geocaching/files/LocParserTest.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/files/LocParserTest.java b/tests/src/cgeo/geocaching/files/LocParserTest.java
index bcc8e78..6e00b35 100644
--- a/tests/src/cgeo/geocaching/files/LocParserTest.java
+++ b/tests/src/cgeo/geocaching/files/LocParserTest.java
@@ -2,6 +2,7 @@ package cgeo.geocaching.files;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.enumerations.CacheSize;
+import cgeo.geocaching.enumerations.CacheType;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.test.AbstractResourceInstrumentationTestCase;
import cgeo.geocaching.test.R;
@@ -35,6 +36,7 @@ public class LocParserTest extends AbstractResourceInstrumentationTestCase {
assertNotNull(cache);
assertEquals("OC5952", cache.getGeocode());
assertEquals("Die Schatzinsel / treasure island", cache.getName());
+ assertEquals("Die unbesiegbaren Geo - Geparden", cache.getOwnerDisplayName());
assertEquals(new Geopoint(48.85968, 9.18740), cache.getCoords());
}
@@ -45,9 +47,26 @@ public class LocParserTest extends AbstractResourceInstrumentationTestCase {
assertNotNull(cache);
assertEquals("GC1BKP3", cache.getGeocode());
assertEquals("Die Schatzinsel / treasure island", cache.getName());
+ assertEquals("Die unbesiegbaren Geo - Geparden", cache.getOwnerDisplayName());
assertEquals(new Geopoint(48.859683, 9.1874), cache.getCoords());
assertEquals(1.0f, cache.getDifficulty());
assertEquals(5.0f, cache.getTerrain());
assertEquals(CacheSize.MICRO, cache.getSize());
}
+
+ public void testWaymarkingLoc() throws IOException, ParserException {
+ final List<Geocache> waymarks = readLoc(R.raw.waymarking_loc);
+ assertEquals(1, waymarks.size());
+ final Geocache waymark = waymarks.get(0);
+ assertNotNull(waymark);
+ assertEquals("WM7BK7", waymark.getGeocode());
+ assertEquals("Römerstrasse Kornwestheim", waymark.getName());
+ assertEquals("travelling", waymark.getOwnerDisplayName());
+ assertEquals(new Geopoint(48.856733, 9.197683), waymark.getCoords());
+ // links are not yet stored for single caches
+ // assertEquals("http://www.waymarking.com/waymarks/WM7BK7_Rmerstrasse_Kornwestheim", waymark.getUrl());
+ assertEquals(CacheSize.UNKNOWN, waymark.getSize());
+ assertEquals(CacheType.UNKNOWN, waymark.getType());
+ }
+
}