diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2013-06-08 11:42:58 +0200 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2013-06-08 11:42:58 +0200 |
| commit | 4db2bf20294175048bf1124bc29143074d01c42b (patch) | |
| tree | 0e2428604c2793213f9fcc0e1932cb43b2361f4a /tests/src/cgeo/geocaching | |
| parent | 934945bddf33ec77ee77daff1add6498fe08e400 (diff) | |
| download | cgeo-4db2bf20294175048bf1124bc29143074d01c42b.zip cgeo-4db2bf20294175048bf1124bc29143074d01c42b.tar.gz cgeo-4db2bf20294175048bf1124bc29143074d01c42b.tar.bz2 | |
new: support for waymarking GPX files
* Now one can load cache and waymark GPX together (as unknown caches)
* I do not plan on adding any online features to the connector.
* It is only there for creating the URLs for waymarks.
Diffstat (limited to 'tests/src/cgeo/geocaching')
| -rw-r--r-- | tests/src/cgeo/geocaching/files/GPXParserTest.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/files/GPXParserTest.java b/tests/src/cgeo/geocaching/files/GPXParserTest.java index 8fd962e..5732f9a 100644 --- a/tests/src/cgeo/geocaching/files/GPXParserTest.java +++ b/tests/src/cgeo/geocaching/files/GPXParserTest.java @@ -13,6 +13,8 @@ import cgeo.geocaching.geopoint.Geopoint; import cgeo.geocaching.test.AbstractResourceInstrumentationTestCase; import cgeo.geocaching.test.R; +import org.apache.commons.lang3.StringUtils; + import java.io.IOException; import java.io.InputStream; import java.text.ParseException; @@ -281,4 +283,16 @@ public class GPXParserTest extends AbstractResourceInstrumentationTestCase { removeCacheCompletely(geocode); } + public void testWaymarking() throws Exception { + final List<Geocache> caches = readGPX10(R.raw.waymarking_gpx); + assertEquals(1, caches.size()); + final Geocache waymark = caches.get(0); + assertNotNull(waymark); + assertEquals("WM7BM7", waymark.getGeocode()); + assertEquals("Roman water pipe Kornwestheim", waymark.getName()); + assertTrue(StringUtils.isNotBlank(waymark.getUrl())); // connector must be able to create it + assertEquals(CacheType.UNKNOWN, waymark.getType()); + assertEquals(CacheSize.UNKNOWN, waymark.getSize()); + } + } |
