diff options
author | Samuel Tardieu <sam@rfc1149.net> | 2014-03-31 15:06:25 +0200 |
---|---|---|
committer | Samuel Tardieu <sam@rfc1149.net> | 2014-03-31 15:06:25 +0200 |
commit | 46675dfdcb4c7b511b4c35e4a2242e47d4678fd4 (patch) | |
tree | 4dbec27998729b792d90ac6b0ee49648f77ccf3a /tests | |
parent | 4f8a1c6aeef324547ddd9e48ed726b57bfe8cf51 (diff) | |
download | cgeo-46675dfdcb4c7b511b4c35e4a2242e47d4678fd4.zip cgeo-46675dfdcb4c7b511b4c35e4a2242e47d4678fd4.tar.gz cgeo-46675dfdcb4c7b511b4c35e4a2242e47d4678fd4.tar.bz2 |
fix #3707: missing method in Android < 2.3
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/cgeo/geocaching/CgeoApplicationTest.java | 8 | ||||
-rw-r--r-- | tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/src/cgeo/geocaching/CgeoApplicationTest.java b/tests/src/cgeo/geocaching/CgeoApplicationTest.java index e834c68..2ebc1f4 100644 --- a/tests/src/cgeo/geocaching/CgeoApplicationTest.java +++ b/tests/src/cgeo/geocaching/CgeoApplicationTest.java @@ -307,7 +307,7 @@ public class CgeoApplicationTest extends CGeoTestCase { // check coords for DETAILED Settings.setLiveMapStrategy(Strategy.DETAILED); - SearchResult search = ConnectorFactory.searchByViewport(viewport, tokens).toBlockingObservable().single(); + SearchResult search = ConnectorFactory.searchByViewport(viewport, tokens); assertNotNull(search); assertTrue(search.getGeocodes().contains(mockedCache.getGeocode())); Geocache parsedCache = DataStore.loadCache(mockedCache.getGeocode(), LoadFlags.LOAD_CACHE_OR_DB); @@ -319,7 +319,7 @@ public class CgeoApplicationTest extends CGeoTestCase { Settings.setLiveMapStrategy(Strategy.FAST); Tile.cache.removeFromTileCache(mockedCache); - search = ConnectorFactory.searchByViewport(viewport, tokens).toBlockingObservable().single(); + search = ConnectorFactory.searchByViewport(viewport, tokens); assertNotNull(search); assertTrue(search.getGeocodes().contains(mockedCache.getGeocode())); parsedCache = DataStore.loadCache(mockedCache.getGeocode(), LoadFlags.LOAD_CACHE_OR_DB); @@ -358,7 +358,7 @@ public class CgeoApplicationTest extends CGeoTestCase { Settings.setCacheType(CacheType.ALL); Viewport viewport = new Viewport(cache, 0.003, 0.003); - SearchResult search = ConnectorFactory.searchByViewport(viewport, INVALID_TOKEN).toBlockingObservable().single(); + SearchResult search = ConnectorFactory.searchByViewport(viewport, INVALID_TOKEN); assertNotNull(search); assertTrue(search.getGeocodes().contains(cache.getGeocode())); @@ -375,7 +375,7 @@ public class CgeoApplicationTest extends CGeoTestCase { deleteCacheFromDBAndLogout(cache.getGeocode()); viewport = new Viewport(cache, 0.003, 0.003); - search = ConnectorFactory.searchByViewport(viewport, INVALID_TOKEN).toBlockingObservable().single(); + search = ConnectorFactory.searchByViewport(viewport, INVALID_TOKEN); assertNotNull(search); // In the meantime, premium-member caches are also shown on map when not logged in diff --git a/tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java b/tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java index 47c3f6f..4a81231 100644 --- a/tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java +++ b/tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java @@ -26,7 +26,7 @@ public class GCConnectorTest extends AbstractResourceInstrumentationTestCase { { final Viewport viewport = new Viewport(new Geopoint("N 52° 25.369 E 9° 35.499"), new Geopoint("N 52° 25.600 E 9° 36.200")); - final SearchResult searchResult = ConnectorFactory.searchByViewport(viewport, tokens).toBlockingObservable().single(); + final SearchResult searchResult = ConnectorFactory.searchByViewport(viewport, tokens); assertNotNull(searchResult); assertFalse(searchResult.isEmpty()); assertTrue(searchResult.getGeocodes().contains("GC4ER5H")); @@ -35,7 +35,7 @@ public class GCConnectorTest extends AbstractResourceInstrumentationTestCase { { final Viewport viewport = new Viewport(new Geopoint("N 52° 24.000 E 9° 34.500"), new Geopoint("N 52° 26.000 E 9° 38.500")); - final SearchResult searchResult = ConnectorFactory.searchByViewport(viewport, tokens).toBlockingObservable().single(); + final SearchResult searchResult = ConnectorFactory.searchByViewport(viewport, tokens); assertNotNull(searchResult); assertTrue(searchResult.getGeocodes().contains("GC4ER5H")); } |