aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/geocaching/cgeoApplicationTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/cgeo/geocaching/cgeoApplicationTest.java')
-rw-r--r--tests/src/cgeo/geocaching/cgeoApplicationTest.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/src/cgeo/geocaching/cgeoApplicationTest.java b/tests/src/cgeo/geocaching/cgeoApplicationTest.java
index 2a27862..34e62f9 100644
--- a/tests/src/cgeo/geocaching/cgeoApplicationTest.java
+++ b/tests/src/cgeo/geocaching/cgeoApplicationTest.java
@@ -10,6 +10,8 @@ import android.test.suitebuilder.annotation.SmallTest;
import java.util.Date;
+import junit.framework.Assert;
+
/**
* The c:geo application test. It can be used for tests that require an
* application and/or context.
@@ -80,11 +82,12 @@ public class cgeoApplicationTest extends ApplicationTestCase<cgeoapplication> {
* Test {@link cgBase#searchByGeocode(String, String, int, boolean, CancellableHandler)}
*/
@MediumTest
- public static void testSearchByGeocode() {
- final cgSearch search = cgBase.searchByGeocode("GC1RMM2", null, 0, true, null);
+ public static cgCache testSearchByGeocode(final String geocode) {
+ final cgSearch search = cgBase.searchByGeocode(geocode, null, 0, true, null);
assertNotNull(search);
assertEquals(1, search.getGeocodes().size());
- assertTrue(search.getGeocodes().contains("GC1RMM2"));
+ assertTrue(search.getGeocodes().contains(geocode));
+ return cgeoapplication.getInstance().getCacheByGeocode(geocode);
}
/**
@@ -129,5 +132,13 @@ public class cgeoApplicationTest extends ApplicationTestCase<cgeoapplication> {
assertTrue(search.getGeocodes().contains("GCP0A9"));
}
+ /**
+ * Caches that are good test cases
+ */
+ public static void testSpecialties() {
+ cgCache GCV2R9 = cgeoApplicationTest.testSearchByGeocode("GCV2R9");
+ Assert.assertEquals("California, United States", GCV2R9.getLocation());
+ }
+
}