diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2013-01-31 07:30:23 +0100 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2013-01-31 07:30:23 +0100 |
| commit | 00b36f16e4768da7b252f31089ce1cfd19b2c2c6 (patch) | |
| tree | c23db4a657680331eab1d67c87ea52eb1ef38708 /tests | |
| parent | a47c952b407762d145636f2a867e2e47cf85c24d (diff) | |
| download | cgeo-00b36f16e4768da7b252f31089ce1cfd19b2c2c6.zip cgeo-00b36f16e4768da7b252f31089ce1cfd19b2c2c6.tar.gz cgeo-00b36f16e4768da7b252f31089ce1cfd19b2c2c6.tar.bz2 | |
refactoring: simplify cache type checks
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/src/cgeo/geocaching/enumerations/CacheTypeTest.java | 11 |
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)); + } } |
