diff options
Diffstat (limited to 'tests/src/cgeo/geocaching/connector/oc/OCConnectorTest.java')
-rw-r--r-- | tests/src/cgeo/geocaching/connector/oc/OCConnectorTest.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/connector/oc/OCConnectorTest.java b/tests/src/cgeo/geocaching/connector/oc/OCConnectorTest.java index 0aad3aa..697b8d8 100644 --- a/tests/src/cgeo/geocaching/connector/oc/OCConnectorTest.java +++ b/tests/src/cgeo/geocaching/connector/oc/OCConnectorTest.java @@ -24,4 +24,15 @@ public class OCConnectorTest extends TestCase { return ocConnector; } + public static void testGetGeocodeFromUrlDe() throws Exception { + final IConnector connector = ConnectorFactory.getConnector("OC0028"); + assertThat(connector.getGeocodeFromUrl("http://opencaching.de/OC0028")).isEqualTo("OC0028"); + assertThat(connector.getGeocodeFromUrl("http://www.opencaching.de/OC0028")).isEqualTo("OC0028"); + } + + public static void testGetGeocodeFromUrlUs() throws Exception { + final IConnector connector = ConnectorFactory.getConnector("OU07A0"); + assertThat(connector.getGeocodeFromUrl("http://www.opencaching.us/viewcache.php?wp=OU07A0")).isEqualTo("OU07A0"); + } + } |