aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2013-06-21 18:58:40 +0200
committerBananeweizen <bananeweizen@gmx.de>2013-06-21 18:58:40 +0200
commitf89ee124998540a981c606213b95fb97f467a68c (patch)
tree57b2e891e777fc0ad52636cc83860771ec27f30c /tests/src
parent537f8a55c1b9975f54db7d8bd842783f928f530b (diff)
downloadcgeo-f89ee124998540a981c606213b95fb97f467a68c.zip
cgeo-f89ee124998540a981c606213b95fb97f467a68c.tar.gz
cgeo-f89ee124998540a981c606213b95fb97f467a68c.tar.bz2
refactoring: add test for loading of cache history
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/cgeo/geocaching/cgDataTest.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/cgDataTest.java b/tests/src/cgeo/geocaching/cgDataTest.java
index a6fb846..ce825f6 100644
--- a/tests/src/cgeo/geocaching/cgDataTest.java
+++ b/tests/src/cgeo/geocaching/cgDataTest.java
@@ -131,4 +131,15 @@ public class cgDataTest extends CGeoTestCase {
assertNotNull("Logs must not be null", logs);
assertEquals("Logs from empty geocode must be empty", 0, logs.size());
}
+
+ public static void testLoadCacheHistory() {
+ int sumCaches = 0;
+ for (CacheType cacheType : CacheType.values()) {
+ SearchResult historyOfType = cgData.getHistoryOfCaches(false, cacheType);
+ assertNotNull(historyOfType);
+ sumCaches += historyOfType.getCount();
+ }
+ // check that two different routines behave the same
+ assertEquals(cgData.getAllHistoryCachesCount(), sumCaches);
+ }
}