aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/src/cgeo/geocaching/enumerations/CacheTypeTest.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/enumerations/CacheTypeTest.java b/tests/src/cgeo/geocaching/enumerations/CacheTypeTest.java
index 21e97c0..fec7652 100644
--- a/tests/src/cgeo/geocaching/enumerations/CacheTypeTest.java
+++ b/tests/src/cgeo/geocaching/enumerations/CacheTypeTest.java
@@ -1,5 +1,7 @@
package cgeo.geocaching.enumerations;
+import cgeo.geocaching.cgCache;
+
import android.test.AndroidTestCase;
import java.util.Locale;
@@ -35,4 +37,13 @@ public class CacheTypeTest extends AndroidTestCase {
assertEquals(type, CacheType.getByPattern(type.pattern.toUpperCase(Locale.US)));
}
}
+
+ public static void testContainsCache() throws Exception {
+ final cgCache traditional = new cgCache();
+ traditional.setType(CacheType.TRADITIONAL);
+
+ assertTrue(CacheType.ALL.contains(traditional));
+ assertTrue(CacheType.TRADITIONAL.contains(traditional));
+ assertFalse(CacheType.MYSTERY.contains(traditional));
+ }
}