<NME> CacheTest.java
<BEF> ADDFILE
<MSG> fix #888: creating calendar entry on event date doesn't work
<DFF> @@ -0,0 +1,28 @@
+package cgeo.geocaching;
+
+import cgeo.geocaching.enumerations.CacheType;
+
+import android.test.AndroidTestCase;
+
+import java.util.Date;
+
+public class CacheTest extends AndroidTestCase {
+
+    final static private class MockedEventCache extends cgCache {
+        public MockedEventCache(final Date date) {
+            setHidden(date);
+            setType(CacheType.EVENT);
+        }
+    }
+
+    public static void testCanBeAddedToCalendar() {
+        final Date today = new Date();
+        final cgCache cacheToday = new MockedEventCache(today);
+        assertTrue(cacheToday.canBeAddedToCalendar());
+
+        final Date yesterday = new Date(today.getTime() - 86400 * 1000);
+        final MockedEventCache cacheYesterday = new MockedEventCache(yesterday);
+        assertFalse(cacheYesterday.canBeAddedToCalendar());
+    }
+
+}

fix #888: creating calendar entry on event date doesn't work