From 15c43ea435b878ef96d7ba6857aad851a373d6e7 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Sat, 22 Oct 2011 11:46:58 +0200 Subject: Split cache loading in offline + online modes Also, add a new "loading elevation data" step in progress dialog. This closes #701. --- tests/src/cgeo/geocaching/ParserTest.java | 2 +- tests/src/cgeo/geocaching/cgeoApplicationTest.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/src') diff --git a/tests/src/cgeo/geocaching/ParserTest.java b/tests/src/cgeo/geocaching/ParserTest.java index 26e5182..1f61554 100644 --- a/tests/src/cgeo/geocaching/ParserTest.java +++ b/tests/src/cgeo/geocaching/ParserTest.java @@ -15,7 +15,7 @@ public class ParserTest extends InstrumentationTestCase { } public void testOwnerDecoding() { - cgCacheWrap caches = cgBase.parseCache(getFileContent(R.raw.gc1zxez), 0, null); + cgCacheWrap caches = cgBase.parseCacheFromText(getFileContent(R.raw.gc1zxez), 0, null); assertEquals(1, caches.cacheList.size()); final cgCache cache = caches.cacheList.get(0); assertEquals("Ms.Marple/Mr.Stringer", cache.ownerReal); diff --git a/tests/src/cgeo/geocaching/cgeoApplicationTest.java b/tests/src/cgeo/geocaching/cgeoApplicationTest.java index 25501cf..20743f1 100644 --- a/tests/src/cgeo/geocaching/cgeoApplicationTest.java +++ b/tests/src/cgeo/geocaching/cgeoApplicationTest.java @@ -59,13 +59,13 @@ public class cgeoApplicationTest extends ApplicationTestCase { } /** - * Test {@link cgBase#parseCache(String, int) with "mocked" data + * Test {@link cgBase#parseCacheFromText(String, int, Handler) with "mocked" data * @param base */ @MediumTest - public static void testParseCache() { + public static void testParseCacheFromText() { for (MockedCache cache : RegExPerformanceTest.MOCKED_CACHES) { - cgCacheWrap caches = cgBase.parseCache(cache.getData(), 0, null); + cgCacheWrap caches = cgBase.parseCacheFromText(cache.getData(), 0, null); cgCache cacheParsed = caches.cacheList.get(0); Assert.assertEquals(cache.getGeocode(), cacheParsed.getGeocode()); Assert.assertEquals(cache.getType(), cacheParsed.getType()); @@ -110,7 +110,7 @@ public class cgeoApplicationTest extends ApplicationTestCase { } public static void testParseLocationWithLink() { - cgCacheWrap caches = cgBase.parseCache(MockedCache.readCachePage("GCV2R9"), 0, null); + cgCacheWrap caches = cgBase.parseCacheFromText(MockedCache.readCachePage("GCV2R9"), 0, null); assertEquals(1, caches.cacheList.size()); cgCache cache = caches.cacheList.get(0); Assert.assertEquals("California, United States", cache.getLocation()); -- cgit v1.1