diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2013-06-21 18:58:40 +0200 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2013-06-21 18:58:40 +0200 |
| commit | f89ee124998540a981c606213b95fb97f467a68c (patch) | |
| tree | 57b2e891e777fc0ad52636cc83860771ec27f30c /tests/src | |
| parent | 537f8a55c1b9975f54db7d8bd842783f928f530b (diff) | |
| download | cgeo-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.java | 11 |
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); + } } |
