From f2792d8f898556cf0ba26cd468946c8c9b49087a Mon Sep 17 00:00:00 2001 From: blafoo Date: Sat, 17 Dec 2011 10:05:14 +0100 Subject: Additional online tests --- main/src/cgeo/geocaching/cgeoapplication.java | 2 +- tests/src/cgeo/geocaching/cgeoApplicationTest.java | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/main/src/cgeo/geocaching/cgeoapplication.java b/main/src/cgeo/geocaching/cgeoapplication.java index e9cbb54..5a5042e 100644 --- a/main/src/cgeo/geocaching/cgeoapplication.java +++ b/main/src/cgeo/geocaching/cgeoapplication.java @@ -327,7 +327,7 @@ public class cgeoapplication extends Application { return null; } - return getCacheByGeocode(geocode, cgCache.LOADWAYPOINTS); + return getCacheByGeocode(geocode, cgCache.LOADALL); } public cgCache getCacheByGeocode(final String geocode, final int loadFlags) { diff --git a/tests/src/cgeo/geocaching/cgeoApplicationTest.java b/tests/src/cgeo/geocaching/cgeoApplicationTest.java index 34e62f9..a22ce94 100644 --- a/tests/src/cgeo/geocaching/cgeoApplicationTest.java +++ b/tests/src/cgeo/geocaching/cgeoApplicationTest.java @@ -2,6 +2,8 @@ package cgeo.geocaching; import cgeo.geocaching.enumerations.CacheType; import cgeo.geocaching.geopoint.Geopoint; +import cgeo.geocaching.test.RegExPerformanceTest; +import cgeo.geocaching.test.mock.MockedCache; import cgeo.geocaching.utils.CancellableHandler; import android.test.ApplicationTestCase; @@ -133,9 +135,19 @@ public class cgeoApplicationTest extends ApplicationTestCase { } /** + * Test cache parsing. Esp. useful after a GC.com update + */ + public static void testCacheBasics() { + for (MockedCache mockedCache : RegExPerformanceTest.MOCKED_CACHES) { + cgCache parsedCache = cgeoApplicationTest.testSearchByGeocode(mockedCache.getGeocode()); + cgBaseTest.testCompareCaches(mockedCache, parsedCache); + } + } + + /** * Caches that are good test cases */ - public static void testSpecialties() { + public static void testCacheSpecialties() { cgCache GCV2R9 = cgeoApplicationTest.testSearchByGeocode("GCV2R9"); Assert.assertEquals("California, United States", GCV2R9.getLocation()); } -- cgit v1.1