aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2015-02-04 08:14:47 +0100
committerBananeweizen <bananeweizen@gmx.de>2015-02-04 08:14:47 +0100
commitf34ab900343037b6b49cf7b84ba927f0f7289ca9 (patch)
tree2495df0a7182bd3694a92e51ccae7d98e5128b65 /tests
parent64d6cd3ed58a99fa46d8ca7d39906025971aead5 (diff)
downloadcgeo-f34ab900343037b6b49cf7b84ba927f0f7289ca9.zip
cgeo-f34ab900343037b6b49cf7b84ba927f0f7289ca9.tar.gz
cgeo-f34ab900343037b6b49cf7b84ba927f0f7289ca9.tar.bz2
fix #4653: fetch all OC logs
Diffstat (limited to 'tests')
-rw-r--r--tests/src/cgeo/geocaching/connector/oc/OkapiClientTest.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/src/cgeo/geocaching/connector/oc/OkapiClientTest.java b/tests/src/cgeo/geocaching/connector/oc/OkapiClientTest.java
index aa66ac9..22b2dbe 100644
--- a/tests/src/cgeo/geocaching/connector/oc/OkapiClientTest.java
+++ b/tests/src/cgeo/geocaching/connector/oc/OkapiClientTest.java
@@ -30,7 +30,7 @@ public class OkapiClientTest extends CGeoTestCase {
public static void testOCSearchMustWorkWithoutOAuthAccessTokens() {
final String geoCode = "OC1234";
- Geocache cache = OkapiClient.getCache(geoCode);
+ final Geocache cache = OkapiClient.getCache(geoCode);
assertThat(cache).overridingErrorMessage("You must have a valid OKAPI key installed for running this test (but you do not need to set credentials in the app).").isNotNull();
assertThat(cache.getName()).isEqualTo("Wupper-Schein");
}
@@ -55,9 +55,16 @@ public class OkapiClientTest extends CGeoTestCase {
final String geoCode = "OC6465";
removeCacheCompletely(geoCode);
- Geocache cache = OkapiClient.getCache(geoCode);
+ final Geocache cache = OkapiClient.getCache(geoCode);
assertThat(cache).as("Cache from OKAPI").isNotNull();
assertThat(cache.getLogCounts().get(LogType.WILL_ATTEND)).isGreaterThan(0);
}
+ public static void testGetAllLogs() {
+ final String geoCode = "OC10CB8";
+ final Geocache cache = OkapiClient.getCache(geoCode);
+ final int defaultLogCount = 10;
+ assertThat(cache.getLogs().size()).isGreaterThan(defaultLogCount);
+ }
+
}