aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/geocaching/enumerations/CacheAttributeTest.java
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2012-04-21 11:27:29 +0200
committerBananeweizen <bananeweizen@gmx.de>2012-04-21 11:27:29 +0200
commitfb453e599fed716636b6056739f17e318d55d25c (patch)
tree0b50af7331b93c5abca433a582f16521de7e0f6c /tests/src/cgeo/geocaching/enumerations/CacheAttributeTest.java
parent47ae07d7cec5d0a4e3a6b6f7bc79f03ef055716e (diff)
downloadcgeo-fb453e599fed716636b6056739f17e318d55d25c.zip
cgeo-fb453e599fed716636b6056739f17e318d55d25c.tar.gz
cgeo-fb453e599fed716636b6056739f17e318d55d25c.tar.bz2
refactorings
* always use CacheAttribute for attribute strings * avoid concatenation in append * use SparseArray instead of maps
Diffstat (limited to 'tests/src/cgeo/geocaching/enumerations/CacheAttributeTest.java')
-rw-r--r--tests/src/cgeo/geocaching/enumerations/CacheAttributeTest.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/enumerations/CacheAttributeTest.java b/tests/src/cgeo/geocaching/enumerations/CacheAttributeTest.java
index a15bd17..f369b0e 100644
--- a/tests/src/cgeo/geocaching/enumerations/CacheAttributeTest.java
+++ b/tests/src/cgeo/geocaching/enumerations/CacheAttributeTest.java
@@ -10,4 +10,14 @@ public class CacheAttributeTest extends AndroidTestCase {
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);
+ }
+ }
+ }
}