diff options
| author | blafoo <github@blafoo.de> | 2012-03-13 20:12:24 +0100 |
|---|---|---|
| committer | blafoo <github@blafoo.de> | 2012-03-13 20:13:56 +0100 |
| commit | 9a8f2397035f13621f3e8c9ffbda4b1496fb3ab0 (patch) | |
| tree | 047c51d9eb9ca9c5fd6eedebcfd700990ffd3f56 | |
| parent | d634f312209d0f05987cdfe74640ccfef6182e17 (diff) | |
| download | cgeo-9a8f2397035f13621f3e8c9ffbda4b1496fb3ab0.zip cgeo-9a8f2397035f13621f3e8c9ffbda4b1496fb3ab0.tar.gz cgeo-9a8f2397035f13621f3e8c9ffbda4b1496fb3ab0.tar.bz2 | |
Update of tests due to new Live Map strategy. Fixes #1242
| -rw-r--r-- | tests/src/cgeo/geocaching/cgeoApplicationTest.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/src/cgeo/geocaching/cgeoApplicationTest.java b/tests/src/cgeo/geocaching/cgeoApplicationTest.java index aaa0a43..0bdd3f2 100644 --- a/tests/src/cgeo/geocaching/cgeoApplicationTest.java +++ b/tests/src/cgeo/geocaching/cgeoApplicationTest.java @@ -264,7 +264,8 @@ public class cgeoApplicationTest extends ApplicationTestCase<cgeoapplication> { ImmutablePair<String, String> login = Settings.getLogin(); String memberStatus = Settings.getMemberStatus(); Strategy strategy = Settings.getLiveMapStrategy(); - Settings.setLiveMapStrategy(Strategy.DETAILED); + Strategy testStrategy = Strategy.FAST; // FASTEST, FAST or DETAILED for tests + Settings.setLiveMapStrategy(testStrategy); try { @@ -284,7 +285,8 @@ public class cgeoApplicationTest extends ApplicationTestCase<cgeoapplication> { Log.d(Settings.tag, "cgeoApplicationTest.testSearchByViewportNotLoggedIn: Coords expected = " + cache.getCoords()); Log.d(Settings.tag, "cgeoApplicationTest.testSearchByViewportNotLoggedIn: Coords actual = " + cacheFromViewport.getCoords()); assertFalse(cache.getCoords().isEqualTo(cacheFromViewport.getCoords(), 1e-3)); - // issue #1242 assertFalse(cacheFromViewport.isReliableLatLon()); + // depending on the chosen strategy the coords can be reliable or not + assertEquals(testStrategy == Strategy.DETAILED, cacheFromViewport.isReliableLatLon()); // premium cache cache = new GC2JVEH(); @@ -294,8 +296,8 @@ public class cgeoApplicationTest extends ApplicationTestCase<cgeoapplication> { search = ConnectorFactory.searchByViewport(viewport, tokens); assertNotNull(search); - // It's a premium member cache only and thus not visible to guests (old Live Map !). Visible in new Live Map - assertTrue(search.getGeocodes().contains(cache.getGeocode())); + // depending on the chosen strategy the cache is part of the search or not + assertEquals(testStrategy == Strategy.DETAILED, search.getGeocodes().contains(cache.getGeocode())); } finally { // restore user and password |
