diff options
| author | Portree-Kid <keith.paterson@gmx.de> | 2013-03-08 15:51:14 +0100 |
|---|---|---|
| committer | Portree-Kid <keith.paterson@gmx.de> | 2013-03-08 15:51:14 +0100 |
| commit | c80b90edad7c3721e349b4db3d6c5aa21a6c7a12 (patch) | |
| tree | 7af952f09a1e4d00c7f77cb1936a86bc81b6ef52 /tests/src/cgeo/geocaching/connector/oc/OkapiClientTest.java | |
| parent | a0932683fdf840fd97464e93a4597fac5c93a731 (diff) | |
| parent | ea4e5bbbe197384fe276f85ae11856b0344af02c (diff) | |
| download | cgeo-c80b90edad7c3721e349b4db3d6c5aa21a6c7a12.zip cgeo-c80b90edad7c3721e349b4db3d6c5aa21a6c7a12.tar.gz cgeo-c80b90edad7c3721e349b4db3d6c5aa21a6c7a12.tar.bz2 | |
Merge remote-tracking branch 'upstream/master' into master-master
Conflicts:
main/src/cgeo/geocaching/cgeocaches.java
Diffstat (limited to 'tests/src/cgeo/geocaching/connector/oc/OkapiClientTest.java')
| -rw-r--r-- | tests/src/cgeo/geocaching/connector/oc/OkapiClientTest.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/connector/oc/OkapiClientTest.java b/tests/src/cgeo/geocaching/connector/oc/OkapiClientTest.java new file mode 100644 index 0000000..690cd4c --- /dev/null +++ b/tests/src/cgeo/geocaching/connector/oc/OkapiClientTest.java @@ -0,0 +1,26 @@ +package cgeo.geocaching.connector.oc; + +import cgeo.CGeoTestCase; +import cgeo.geocaching.Geocache; +import cgeo.geocaching.cgData; +import cgeo.geocaching.connector.oc.OkapiClient; +import cgeo.geocaching.enumerations.LoadFlags; + +public class OkapiClientTest extends CGeoTestCase { + + public static void testGetOCCache() { + final String geoCode = "OU0331"; + Geocache cache = OkapiClient.getCache(geoCode); + assertNotNull(cache); + assertEquals(geoCode, cache.getGeocode()); + assertEquals("Oshkosh Municipal Tank", cache.getName()); + assertTrue(cache.isDetailed()); + // cache should be stored to DB (to listID 0) when loaded above + cache = cgData.loadCache(geoCode, LoadFlags.LOAD_ALL_DB_ONLY); + assertNotNull(cache); + assertEquals(geoCode, cache.getGeocode()); + assertEquals("Oshkosh Municipal Tank", cache.getName()); + assertTrue(cache.isDetailed()); + } + +} |
