aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/geocaching/enumerations/CacheAttributeTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/cgeo/geocaching/enumerations/CacheAttributeTest.java')
-rw-r--r--tests/src/cgeo/geocaching/enumerations/CacheAttributeTest.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/enumerations/CacheAttributeTest.java b/tests/src/cgeo/geocaching/enumerations/CacheAttributeTest.java
new file mode 100644
index 0000000..f369b0e
--- /dev/null
+++ b/tests/src/cgeo/geocaching/enumerations/CacheAttributeTest.java
@@ -0,0 +1,23 @@
+package cgeo.geocaching.enumerations;
+
+import android.test.AndroidTestCase;
+
+public class CacheAttributeTest extends AndroidTestCase {
+
+ public static void testTrimAttributeName() {
+ for (CacheAttribute attribute : CacheAttribute.values()) {
+ final String rawName = attribute.gcRawName;
+ assertTrue("bad attribute name " + rawName, CacheAttribute.trimAttributeName(rawName).equals(rawName));
+ }
+ }
+
+ public static void testIds() {
+ for (CacheAttribute attribute : CacheAttribute.values()) {
+ if (attribute != CacheAttribute.UNKNOWN) {
+ assertTrue(attribute.drawableId != 0);
+ assertTrue(attribute.stringIdYes != 0);
+ assertTrue(attribute.stringIdNo != 0);
+ }
+ }
+ }
+}