diff options
Diffstat (limited to 'tests/src/cgeo/geocaching/files/GPXParserTest.java')
| -rw-r--r-- | tests/src/cgeo/geocaching/files/GPXParserTest.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/src/cgeo/geocaching/files/GPXParserTest.java b/tests/src/cgeo/geocaching/files/GPXParserTest.java index 892b2a0..9604519 100644 --- a/tests/src/cgeo/geocaching/files/GPXParserTest.java +++ b/tests/src/cgeo/geocaching/files/GPXParserTest.java @@ -1,9 +1,9 @@ package cgeo.geocaching.files; +import cgeo.geocaching.DataStore; import cgeo.geocaching.Geocache; import cgeo.geocaching.LogEntry; import cgeo.geocaching.Waypoint; -import cgeo.geocaching.cgData; import cgeo.geocaching.enumerations.CacheSize; import cgeo.geocaching.enumerations.CacheType; import cgeo.geocaching.enumerations.LoadFlags; @@ -150,6 +150,9 @@ public class GPXParserTest extends AbstractResourceInstrumentationTestCase { assertEquals(parseTime("2011-09-11T07:00:00Z"), log.date); assertEquals(-1, log.found); assertEquals("Sehr schöne Runde und wir haben wieder etwas Neues über Hockenheim gelernt. Super Tarnung.\nTFTC, Geoteufel", log.log); + assertFalse(log.isOwn()); + assertEquals(log.log, log.getDisplayText()); + assertTrue(log.daysSinceLog() > 700); // following info is not contained in pocket query gpx file assertEquals(0, cache.getAttributes().size()); @@ -212,7 +215,7 @@ public class GPXParserTest extends AbstractResourceInstrumentationTestCase { } } // reload caches, because the parser only returns the minimum version of each cache - return new ArrayList<Geocache>(cgData.loadCaches(result, LoadFlags.LOAD_ALL_DB_ONLY)); + return new ArrayList<Geocache>(DataStore.loadCaches(result, LoadFlags.LOAD_ALL_DB_ONLY)); } public static void testParseDateWithFractionalSeconds() throws ParseException { @@ -255,9 +258,9 @@ public class GPXParserTest extends AbstractResourceInstrumentationTestCase { removeCacheCompletely(geocode); final List<Geocache> caches = readGPX10(R.raw.lazy); assertEquals(1, caches.size()); - cgData.removeAllFromCache(); + DataStore.removeAllFromCache(); // load only the minimum cache, it has several members missing - final Geocache minimalCache = cgData.loadCache(geocode, EnumSet.of(LoadFlag.LOAD_DB_MINIMAL)); + final Geocache minimalCache = DataStore.loadCache(geocode, EnumSet.of(LoadFlag.LOAD_DB_MINIMAL)); // now check that we load lazy members on demand assertFalse(minimalCache.getAttributes().isEmpty()); |
