aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo
diff options
context:
space:
mode:
authorblafoo <github@blafoo.de>2012-02-17 23:24:13 +0100
committerblafoo <github@blafoo.de>2012-02-23 23:19:49 +0100
commit98f3bd4d23f9a095f34b5b18cd08273e601f3981 (patch)
tree2ad830c5d28f974b2636c897f0642b8dc2711d72 /tests/src/cgeo
parent039e877c27688ae67da949480df66108dac7c4c6 (diff)
downloadcgeo-98f3bd4d23f9a095f34b5b18cd08273e601f3981.zip
cgeo-98f3bd4d23f9a095f34b5b18cd08273e601f3981.tar.gz
cgeo-98f3bd4d23f9a095f34b5b18cd08273e601f3981.tar.bz2
JSON (new format) parsing
Diffstat (limited to 'tests/src/cgeo')
-rw-r--r--tests/src/cgeo/geocaching/connector/GCConnectorTest.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/connector/GCConnectorTest.java b/tests/src/cgeo/geocaching/connector/GCConnectorTest.java
new file mode 100644
index 0000000..10f2653
--- /dev/null
+++ b/tests/src/cgeo/geocaching/connector/GCConnectorTest.java
@@ -0,0 +1,20 @@
+package cgeo.geocaching.connector;
+
+import cgeo.geocaching.SearchResult;
+import cgeo.geocaching.geopoint.Viewport;
+import cgeo.geocaching.test.mock.GC2JVEH;
+
+import android.test.AndroidTestCase;
+
+public class GCConnectorTest extends AndroidTestCase {
+
+ @SuppressWarnings("null")
+ public static void testGetViewport() {
+ GC2JVEH cache = new GC2JVEH();
+ final Viewport viewport = new Viewport(cache.getCoords(), 1.0, 1.0);
+ SearchResult searchResult = GCConnectorImpl.searchByViewport(viewport);
+ assertTrue(searchResult != null);
+ assertTrue(searchResult.getGeocodes().contains(cache.getGeocode()));
+ }
+
+}