From 1600e5c513e14d9a3ab1a76688572f36cd73d938 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Tue, 10 Apr 2012 22:36:21 +0200 Subject: 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. --- tests/src/cgeo/geocaching/SettingsTest.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests/src') 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 { * 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); } } -- cgit v1.1