aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2015-01-26 21:00:28 +0100
committerBananeweizen <bananeweizen@gmx.de>2015-01-26 21:00:28 +0100
commitac5a1d50862578e09d1d7e7c6c7d6d44ac414735 (patch)
treebf7143c3b87d54387da61c28932bd82d4f48297b /tests
parent0f0fd3e75d6cfeffd8ba0a3e26e269b0db2b17c7 (diff)
downloadcgeo-ac5a1d50862578e09d1d7e7c6c7d6d44ac414735.zip
cgeo-ac5a1d50862578e09d1d7e7c6c7d6d44ac414735.tar.gz
cgeo-ac5a1d50862578e09d1d7e7c6c7d6d44ac414735.tar.bz2
fix #4634: export GPX for unknown crashes without crash
Diffstat (limited to 'tests')
-rw-r--r--tests/src/cgeo/geocaching/export/ExportTest.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/export/ExportTest.java b/tests/src/cgeo/geocaching/export/ExportTest.java
index edbf413..bec676f 100644
--- a/tests/src/cgeo/geocaching/export/ExportTest.java
+++ b/tests/src/cgeo/geocaching/export/ExportTest.java
@@ -6,6 +6,7 @@ import cgeo.CGeoTestCase;
import cgeo.geocaching.DataStore;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.LogEntry;
+import cgeo.geocaching.connector.ConnectorFactory;
import cgeo.geocaching.enumerations.LoadFlags;
import cgeo.geocaching.enumerations.LogType;
import cgeo.geocaching.location.Geopoint;
@@ -39,6 +40,16 @@ public class ExportTest extends CGeoTestCase {
assertCanExport(cache);
}
+ public static void testGpxExportUnknownConnector() throws InterruptedException, ExecutionException, IOException {
+ final Geocache cache = new Geocache();
+ cache.setGeocode("ABC123");
+ cache.setCoords(new Geopoint("N 49 44.000 E 8 37.000"));
+ DataStore.saveCache(cache, LoadFlags.SAVE_ALL);
+
+ assertThat(ConnectorFactory.getConnector(cache).getName()).isEqualTo("Unknown caches");
+ assertCanExport(cache);
+ }
+
private static void assertCanExport(final Geocache cache) throws InterruptedException, ExecutionException, IOException {
// enforce storing in database, as GPX will not take information from cache
cache.setDetailed(true);