diff options
author | blafoo <github@blafoo.de> | 2012-02-24 21:44:20 +0100 |
---|---|---|
committer | blafoo <github@blafoo.de> | 2012-02-24 22:17:32 +0100 |
commit | 0b2cb4da12d3263a4a264a0e2eb5b8d0a449ee0f (patch) | |
tree | ad3acc3ce228c170784db34f651d84f01ff52a6a /tests | |
parent | b5be674f2344140f89b8d49f5111ff86c519281c (diff) | |
download | cgeo-0b2cb4da12d3263a4a264a0e2eb5b8d0a449ee0f.zip cgeo-0b2cb4da12d3263a4a264a0e2eb5b8d0a449ee0f.tar.gz cgeo-0b2cb4da12d3263a4a264a0e2eb5b8d0a449ee0f.tar.bz2 |
New connector functionality
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/cgeo/geocaching/cgeoApplicationTest.java | 7 | ||||
-rw-r--r-- | tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/tests/src/cgeo/geocaching/cgeoApplicationTest.java b/tests/src/cgeo/geocaching/cgeoApplicationTest.java index 0ea282f..36d95ae 100644 --- a/tests/src/cgeo/geocaching/cgeoApplicationTest.java +++ b/tests/src/cgeo/geocaching/cgeoApplicationTest.java @@ -1,5 +1,6 @@ package cgeo.geocaching; +import cgeo.geocaching.connector.ConnectorFactory; import cgeo.geocaching.connector.gc.GCBase; import cgeo.geocaching.enumerations.CacheType; import cgeo.geocaching.enumerations.LoadFlags; @@ -202,7 +203,7 @@ public class cgeoApplicationTest extends ApplicationTestCase<cgeoapplication> { final String tokens[] = GCBase.getTokens(); final Viewport viewport = new Viewport(cache.getCoords(), 0.003, 0.003); - final SearchResult search = GCBase.searchByViewport(viewport, tokens); + final SearchResult search = ConnectorFactory.searchByViewport(viewport, tokens); // GC2JVEH is a premium members only cache. It can't be "found" by non-premium members if (Settings.isPremiumMember()) { @@ -240,7 +241,7 @@ public class cgeoApplicationTest extends ApplicationTestCase<cgeoapplication> { deleteCacheFromDBAndLogout(cache.getGeocode()); Viewport viewport = new Viewport(cache.getCoords(), 0.003, 0.003); - SearchResult search = GCBase.searchByViewport(viewport, tokens); + SearchResult search = ConnectorFactory.searchByViewport(viewport, tokens); assertNotNull(search); assertTrue(search.getGeocodes().contains(cache.getGeocode())); @@ -255,7 +256,7 @@ public class cgeoApplicationTest extends ApplicationTestCase<cgeoapplication> { deleteCacheFromDBAndLogout(cache.getGeocode()); viewport = new Viewport(cache.getCoords(), 0.003, 0.003); - search = GCBase.searchByViewport(viewport, tokens); + search = ConnectorFactory.searchByViewport(viewport, tokens); assertNotNull(search); // It's a premium member cache only and thus not visible to guests diff --git a/tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java b/tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java index 4271dd4..e86dc06 100644 --- a/tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java +++ b/tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java @@ -2,6 +2,7 @@ package cgeo.geocaching.connector.gc; import cgeo.geocaching.SearchResult; import cgeo.geocaching.cgBase; +import cgeo.geocaching.connector.ConnectorFactory; import cgeo.geocaching.geopoint.Geopoint; import cgeo.geocaching.geopoint.Viewport; @@ -17,7 +18,7 @@ public class GCConnectorTest extends AndroidTestCase { { final Viewport viewport = new Viewport(new Geopoint("N 52° 25.369 E 9° 35.499"), new Geopoint("N 52° 25.371 E 9° 35.501")); - SearchResult searchResult = GCBase.searchByViewport(viewport, tokens); + SearchResult searchResult = ConnectorFactory.searchByViewport(viewport, tokens); assertTrue(searchResult != null); assertTrue(searchResult.getCount() > 130); assertTrue(searchResult.getGeocodes().contains("GC211WG")); @@ -26,7 +27,7 @@ public class GCConnectorTest extends AndroidTestCase { { 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")); - SearchResult searchResult = GCBase.searchByViewport(viewport, tokens); + SearchResult searchResult = ConnectorFactory.searchByViewport(viewport, tokens); assertTrue(searchResult != null); assertTrue(searchResult.getGeocodes().contains("GC211WG")); } |