aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/geocaching/files/GPXParserTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/cgeo/geocaching/files/GPXParserTest.java')
-rw-r--r--tests/src/cgeo/geocaching/files/GPXParserTest.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/src/cgeo/geocaching/files/GPXParserTest.java b/tests/src/cgeo/geocaching/files/GPXParserTest.java
index 6c3c237..f6e6e66 100644
--- a/tests/src/cgeo/geocaching/files/GPXParserTest.java
+++ b/tests/src/cgeo/geocaching/files/GPXParserTest.java
@@ -4,8 +4,8 @@ import cgeo.geocaching.LogEntry;
import cgeo.geocaching.SearchResult;
import cgeo.geocaching.StoredList;
import cgeo.geocaching.cgCache;
+import cgeo.geocaching.cgData;
import cgeo.geocaching.cgWaypoint;
-import cgeo.geocaching.cgeoapplication;
import cgeo.geocaching.enumerations.CacheSize;
import cgeo.geocaching.enumerations.CacheType;
import cgeo.geocaching.enumerations.LoadFlags;
@@ -24,10 +24,11 @@ import java.util.Collection;
import java.util.EnumSet;
import java.util.HashSet;
import java.util.List;
+import java.util.Locale;
import java.util.Set;
public class GPXParserTest extends AbstractResourceInstrumentationTestCase {
- private static final SimpleDateFormat LOG_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); // 2010-04-20T07:00:00Z
+ private static final SimpleDateFormat LOG_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.US); // 2010-04-20T07:00:00Z
private int listId;
public void testGPXVersion100() throws Exception {
@@ -212,7 +213,7 @@ public class GPXParserTest extends AbstractResourceInstrumentationTestCase {
}
}
// reload caches, because the parser only returns the minimum version of each cache
- return new ArrayList<cgCache>(cgeoapplication.getInstance().loadCaches(result, LoadFlags.LOAD_ALL_DB_ONLY));
+ return new ArrayList<cgCache>(cgData.loadCaches(result, LoadFlags.LOAD_ALL_DB_ONLY));
}
public static void testParseDateWithFractionalSeconds() {
@@ -265,10 +266,9 @@ public class GPXParserTest extends AbstractResourceInstrumentationTestCase {
removeCacheCompletely(geocode);
final List<cgCache> caches = readGPX10(R.raw.lazy);
assertEquals(1, caches.size());
- cgeoapplication.getInstance().removeAllFromCache();
-
+ cgData.removeAllFromCache();
// load only the minimum cache, it has several members missing
- final cgCache minimalCache = cgeoapplication.getInstance().loadCache(geocode, EnumSet.of(LoadFlag.LOAD_DB_MINIMAL));
+ final cgCache minimalCache = cgData.loadCache(geocode, EnumSet.of(LoadFlag.LOAD_DB_MINIMAL));
// now check that we load lazy members on demand
assertFalse(minimalCache.getAttributes().isEmpty());
@@ -297,17 +297,17 @@ public class GPXParserTest extends AbstractResourceInstrumentationTestCase {
@Override
protected void setUp() throws Exception {
super.setUp();
- listId = cgeoapplication.getInstance().createList("Temporary unit testing");
+ listId = cgData.createList("Temporary unit testing");
assertTrue(listId != StoredList.TEMPORARY_LIST_ID);
assertTrue(listId != StoredList.STANDARD_LIST_ID);
}
@Override
protected void tearDown() throws Exception {
- SearchResult search = cgeoapplication.getInstance().getBatchOfStoredCaches(false, null, CacheType.ALL, listId);
+ SearchResult search = cgData.getBatchOfStoredCaches(null, CacheType.ALL, listId);
assertNotNull(search);
- cgeoapplication.getInstance().removeCaches(search.getGeocodes(), LoadFlags.REMOVE_ALL);
- cgeoapplication.getInstance().removeList(listId);
+ cgData.removeCaches(search.getGeocodes(), LoadFlags.REMOVE_ALL);
+ cgData.removeList(listId);
super.tearDown();
}
}