diff options
Diffstat (limited to 'tests/src/cgeo/geocaching/enumerations')
4 files changed, 7 insertions, 7 deletions
diff --git a/tests/src/cgeo/geocaching/enumerations/CacheAttributeTest.java b/tests/src/cgeo/geocaching/enumerations/CacheAttributeTest.java index 54db279..d126c0b 100644 --- a/tests/src/cgeo/geocaching/enumerations/CacheAttributeTest.java +++ b/tests/src/cgeo/geocaching/enumerations/CacheAttributeTest.java @@ -25,7 +25,7 @@ public class CacheAttributeTest extends AndroidTestCase { public static void testGetL10n() { final CacheAttribute attribute = CacheAttribute.HIKING; - // This test is language dependend. It does not make sense to test it + // This test is language dependent. It does not make sense to test it // with every attribute. We just want to know if getL10n works // correctly assertFalse("_yes and _no must not have the same translation", @@ -37,7 +37,6 @@ public class CacheAttributeTest extends AndroidTestCase { assertTrue("Test cannot be run with this attribute", attribute.gcid >= 0); assertTrue("Test cannot be run with this attribute", attribute.ocacode >= 0); assertSame(CacheAttribute.getByRawName(attribute.rawName), attribute); - assertSame(CacheAttribute.getByGcId(attribute.gcid), attribute); assertSame(CacheAttribute.getByOcACode(attribute.ocacode), attribute); } diff --git a/tests/src/cgeo/geocaching/enumerations/CacheSizeTest.java b/tests/src/cgeo/geocaching/enumerations/CacheSizeTest.java index 2f11dfc..26a1953 100644 --- a/tests/src/cgeo/geocaching/enumerations/CacheSizeTest.java +++ b/tests/src/cgeo/geocaching/enumerations/CacheSizeTest.java @@ -30,8 +30,6 @@ public class CacheSizeTest extends AndroidTestCase { public static void testGetByIdNumeric() { assertEquals(CacheSize.REGULAR, CacheSize.getById("3")); - assertEquals(CacheSize.UNKNOWN, CacheSize.getById("0")); - assertEquals(CacheSize.UNKNOWN, CacheSize.getById("9")); assertEquals(CacheSize.UNKNOWN, CacheSize.getById("-1")); } } diff --git a/tests/src/cgeo/geocaching/enumerations/LogTypeTest.java b/tests/src/cgeo/geocaching/enumerations/LogTypeTest.java index 81ca33b..47879a0 100644 --- a/tests/src/cgeo/geocaching/enumerations/LogTypeTest.java +++ b/tests/src/cgeo/geocaching/enumerations/LogTypeTest.java @@ -17,8 +17,7 @@ public class LogTypeTest extends AndroidTestCase { } public static void testGetByType() { - assertEquals(LogType.UNKNOWN, LogType.getByIconName("")); - assertEquals(LogType.UNKNOWN, LogType.getByIconName(null)); + assertEquals(LogType.UNKNOWN, LogType.getByType("obviously unknown type")); assertEquals(LogType.GRABBED_IT, LogType.getByType("grabbed it")); assertEquals(LogType.GRABBED_IT, LogType.getByType(" gRAbbed IT ")); } diff --git a/tests/src/cgeo/geocaching/enumerations/LogTypeTrackableTest.java b/tests/src/cgeo/geocaching/enumerations/LogTypeTrackableTest.java index 667eefb..d6b7d33 100644 --- a/tests/src/cgeo/geocaching/enumerations/LogTypeTrackableTest.java +++ b/tests/src/cgeo/geocaching/enumerations/LogTypeTrackableTest.java @@ -1,11 +1,15 @@ package cgeo.geocaching.enumerations; +import org.apache.commons.lang3.StringUtils; + import android.test.AndroidTestCase; public class LogTypeTrackableTest extends AndroidTestCase { public static void testFindById() { - assertEquals(LogTypeTrackable.DO_NOTHING, LogTypeTrackable.findById(12345)); + for (LogTypeTrackable logTypeTrackable : LogTypeTrackable.values()) { + assertTrue(StringUtils.isNotEmpty(logTypeTrackable.getLabel())); + } } } |
