aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Keppler <michael.keppler@gmx.de>2014-04-23 10:40:55 +0200
committerMichael Keppler <michael.keppler@gmx.de>2014-04-23 10:40:55 +0200
commit97b047e525aaab3df7e5f6b2481f3109f193516e (patch)
tree91547b426c92f2c8cad20fac8f17208fc4aa4e2c
parentcc9aa8b1d2b9ec24f2c41e4a523c69edcf8c8ac0 (diff)
downloadcgeo-97b047e525aaab3df7e5f6b2481f3109f193516e.zip
cgeo-97b047e525aaab3df7e5f6b2481f3109f193516e.tar.gz
cgeo-97b047e525aaab3df7e5f6b2481f3109f193516e.tar.bz2
#3783: support giga event type
New icons are still missing.
-rw-r--r--main/res/values/strings.xml1
-rw-r--r--main/src/cgeo/geocaching/enumerations/CacheType.java5
-rw-r--r--tests/src/cgeo/geocaching/enumerations/CacheTypeTest.java10
3 files changed, 14 insertions, 2 deletions
diff --git a/main/res/values/strings.xml b/main/res/values/strings.xml
index 55d44b8..2aa3d00 100644
--- a/main/res/values/strings.xml
+++ b/main/res/values/strings.xml
@@ -24,6 +24,7 @@
<string name="letterbox">Letterbox Hybrid</string>
<string name="event">Event Cache</string>
<string name="mega">Mega-Event Cache</string>
+ <string name="giga">Giga-Event Cache</string>
<string name="earth">Earthcache</string>
<string name="cito">Cache In Trash Out Event</string>
<string name="webcam">Webcam Cache</string>
diff --git a/main/src/cgeo/geocaching/enumerations/CacheType.java b/main/src/cgeo/geocaching/enumerations/CacheType.java
index 35fe7a1..fee5b3c 100644
--- a/main/src/cgeo/geocaching/enumerations/CacheType.java
+++ b/main/src/cgeo/geocaching/enumerations/CacheType.java
@@ -19,7 +19,8 @@ public enum CacheType {
MYSTERY("mystery", "Unknown Cache", "40861821-1835-4e11-b666-8d41064d03fe", R.string.mystery, R.drawable.type_mystery),
LETTERBOX("letterbox", "Letterbox hybrid", "4bdd8fb2-d7bc-453f-a9c5-968563b15d24", R.string.letterbox, R.drawable.type_letterbox),
EVENT("event", "Event Cache", "69eb8534-b718-4b35-ae3c-a856a55b0874", R.string.event, R.drawable.type_event),
- MEGA_EVENT("mega", "Mega-event Cache", "69eb8535-b718-4b35-ae3c-a856a55b0874", R.string.mega, R.drawable.type_mega),
+ MEGA_EVENT("mega", "Mega-Event Cache", "69eb8535-b718-4b35-ae3c-a856a55b0874", R.string.mega, R.drawable.type_mega),
+ GIGA_EVENT("giga", "Giga-Event Cache", "51420629-5739-4945-8bdd-ccfd434c0ead", R.string.giga, R.drawable.type_mega), // icon missing
EARTH("earth", "Earthcache", "c66f5cf3-9523-4549-b8dd-759cd2f18db8", R.string.earth, R.drawable.type_earth),
CITO("cito", "Cache in Trash out Event", "57150806-bc1a-42d6-9cf0-538d171a2d22", R.string.cito, R.drawable.type_cito),
WEBCAM("webcam", "Webcam Cache", "31d2ae3c-c358-4b5f-8dcd-2185bf472d3d", R.string.webcam, R.drawable.type_webcam),
@@ -89,7 +90,7 @@ public enum CacheType {
}
public boolean isEvent() {
- return EVENT == this || MEGA_EVENT == this || CITO == this || LOSTANDFOUND == this || BLOCK_PARTY == this || GPS_EXHIBIT == this;
+ return EVENT == this || MEGA_EVENT == this || CITO == this || GIGA_EVENT == this || LOSTANDFOUND == this || BLOCK_PARTY == this || GPS_EXHIBIT == this;
}
@Override
diff --git a/tests/src/cgeo/geocaching/enumerations/CacheTypeTest.java b/tests/src/cgeo/geocaching/enumerations/CacheTypeTest.java
index ce42e0c..1573f6e 100644
--- a/tests/src/cgeo/geocaching/enumerations/CacheTypeTest.java
+++ b/tests/src/cgeo/geocaching/enumerations/CacheTypeTest.java
@@ -48,4 +48,14 @@ public class CacheTypeTest extends AndroidTestCase {
assertThat(CacheType.TRADITIONAL.contains(traditional)).isTrue();
assertThat(CacheType.MYSTERY.contains(traditional)).isFalse();
}
+
+ public static void testEventCacheTypes() throws Exception {
+ assertThat(CacheType.EVENT.isEvent()).isTrue();
+ assertThat(CacheType.MEGA_EVENT.isEvent()).isTrue();
+ assertThat(CacheType.GIGA_EVENT.isEvent()).isTrue();
+ assertThat(CacheType.BLOCK_PARTY.isEvent()).isTrue();
+ assertThat(CacheType.CITO.isEvent()).isTrue();
+ assertThat(CacheType.LOSTANDFOUND.isEvent()).isTrue();
+ assertThat(CacheType.TRADITIONAL.isEvent()).isFalse();
+ }
}