aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/geocaching/SettingsTest.java
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2012-04-10 22:36:21 +0200
committerSamuel Tardieu <sam@rfc1149.net>2012-04-11 15:50:54 +0200
commit1600e5c513e14d9a3ab1a76688572f36cd73d938 (patch)
tree0fe05fa3473d7dc15634d66f6e8741dc86e8e963 /tests/src/cgeo/geocaching/SettingsTest.java
parent4b5d28aa82b67a46883e4c905532a690a2e603fa (diff)
downloadcgeo-1600e5c513e14d9a3ab1a76688572f36cd73d938.zip
cgeo-1600e5c513e14d9a3ab1a76688572f36cd73d938.tar.gz
cgeo-1600e5c513e14d9a3ab1a76688572f36cd73d938.tar.bz2
Move two methods into the tests
Those two methods were only used in the tests. They can be rewritten more concisely while testing the same thing.
Diffstat (limited to 'tests/src/cgeo/geocaching/SettingsTest.java')
-rw-r--r--tests/src/cgeo/geocaching/SettingsTest.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/src/cgeo/geocaching/SettingsTest.java b/tests/src/cgeo/geocaching/SettingsTest.java
index c31e635..27395ec 100644
--- a/tests/src/cgeo/geocaching/SettingsTest.java
+++ b/tests/src/cgeo/geocaching/SettingsTest.java
@@ -1,7 +1,6 @@
package cgeo.geocaching;
-import cgeo.geocaching.Settings;
-import cgeo.geocaching.cgeo;
+import org.mapsforge.android.maps.MapDatabase;
import android.test.ActivityInstrumentationTestCase2;
@@ -21,7 +20,9 @@ public class SettingsTest extends ActivityInstrumentationTestCase2<cgeo> {
* this should work fine without an exception (once there was an exception because of the empty map file string)
*/
public static void testSettingsException() {
- // asserts A OR NOT A, because we don't know what the settings are on any device or emulator
- assertTrue(Settings.isValidMapFile() || !Settings.isValidMapFile());
+ final String mapFile = Settings.getMapFile();
+ assertNotNull(mapFile);
+ // We just want to ensure that it does not throw any exception but we do not know anything about the result
+ MapDatabase.isValidMapFile(mapFile);
}
}