aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/geocaching/cgeoApplicationTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/cgeo/geocaching/cgeoApplicationTest.java')
-rw-r--r--tests/src/cgeo/geocaching/cgeoApplicationTest.java50
1 files changed, 26 insertions, 24 deletions
diff --git a/tests/src/cgeo/geocaching/cgeoApplicationTest.java b/tests/src/cgeo/geocaching/cgeoApplicationTest.java
index 82e31f7..83bf28d 100644
--- a/tests/src/cgeo/geocaching/cgeoApplicationTest.java
+++ b/tests/src/cgeo/geocaching/cgeoApplicationTest.java
@@ -12,6 +12,9 @@ import cgeo.geocaching.enumerations.LogType;
import cgeo.geocaching.enumerations.StatusCode;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.geopoint.Viewport;
+import cgeo.geocaching.loaders.RecaptchaReceiver;
+import cgeo.geocaching.settings.Settings;
+import cgeo.geocaching.settings.TestSettings;
import cgeo.geocaching.test.RegExPerformanceTest;
import cgeo.geocaching.test.mock.GC1ZXX2;
import cgeo.geocaching.test.mock.GC2CJPF;
@@ -51,7 +54,7 @@ public class cgeoApplicationTest extends CGeoTestCase {
}
/**
- * Test {@link cgBase#searchTrackable(String, String, String)}
+ * Test {@link GCParser#searchTrackable(String, String, String)}
*/
@MediumTest
public static void testSearchTrackableNotExisting() {
@@ -60,7 +63,7 @@ public class cgeoApplicationTest extends CGeoTestCase {
}
/**
- * Test {@link cgBase#searchTrackable(String, String, String)}
+ * Test {@link GCParser#searchTrackable(String, String, String)}
*/
@MediumTest
public static void testSearchTrackable() {
@@ -99,7 +102,7 @@ public class cgeoApplicationTest extends CGeoTestCase {
}
/**
- * Test {@link cgBase#searchByGeocode(String, String, int, boolean, CancellableHandler)}
+ * Test {@link GCParser#searchByGeocode(String, String, int, boolean, CancellableHandler)}
*/
@MediumTest
public static Geocache testSearchByGeocode(final String geocode) {
@@ -115,7 +118,7 @@ public class cgeoApplicationTest extends CGeoTestCase {
}
/**
- * Test {@link cgBase#searchByGeocode(String, String, int, boolean, CancellableHandler)}
+ * Test {@link Geocache#searchByGeocode(String, String, int, boolean, CancellableHandler)}
*/
@MediumTest
public static void testSearchByGeocodeNotExisting() {
@@ -125,11 +128,11 @@ public class cgeoApplicationTest extends CGeoTestCase {
}
/**
- * Test {@link cgBase#searchByGeocode(String, String, int, boolean, CancellableHandler)}
+ * Test {@link Geocache#searchByGeocode(String, String, int, boolean, CancellableHandler)}
*/
@MediumTest
public static void testSearchByGeocodeNotLoggedIn() {
- final ImmutablePair<String, String> login = Settings.getLogin();
+ final ImmutablePair<String, String> login = Settings.getGcLogin();
final String memberStatus = Settings.getMemberStatus();
try {
@@ -157,18 +160,18 @@ public class cgeoApplicationTest extends CGeoTestCase {
} finally {
// restore user and password
- Settings.setLogin(login.left, login.right);
+ TestSettings.setLogin(login.left, login.right);
Settings.setMemberStatus(memberStatus);
Login.login();
}
}
/**
- * Test {@link cgBase#searchByGeocode(String, String, int, boolean, CancellableHandler)}
+ * Test {@link Geocache#searchByGeocode(String, String, int, boolean, CancellableHandler)}
*/
@MediumTest
public static void testSearchErrorOccured() {
- final ImmutablePair<String, String> login = Settings.getLogin();
+ final ImmutablePair<String, String> login = Settings.getGcLogin();
final String memberStatus = Settings.getMemberStatus();
try {
@@ -183,7 +186,7 @@ public class cgeoApplicationTest extends CGeoTestCase {
} finally {
// restore user and password
- Settings.setLogin(login.left, login.right);
+ TestSettings.setLogin(login.left, login.right);
Settings.setMemberStatus(memberStatus);
Login.login();
}
@@ -200,20 +203,20 @@ public class cgeoApplicationTest extends CGeoTestCase {
final boolean excludeDisabled = Settings.isExcludeDisabledCaches();
try {
// set up settings required for test
- Settings.setExcludeMine(false);
- Settings.setExcludeDisabledCaches(false);
+ TestSettings.setExcludeMine(false);
+ TestSettings.setExcludeDisabledCaches(false);
runnable.run();
} finally {
// restore user settings
- Settings.setExcludeMine(excludeMine);
- Settings.setExcludeDisabledCaches(excludeDisabled);
+ TestSettings.setExcludeMine(excludeMine);
+ TestSettings.setExcludeDisabledCaches(excludeDisabled);
}
}
/**
- * Test {@link cgBase#searchByCoords(AbstractSearchThread, Geopoint, String, int, boolean)}
+ * Test {@link GCParser#searchByCoords(Geopoint, CacheType, boolean, RecaptchaReceiver)}
*/
@MediumTest
public static void testSearchByCoords() {
@@ -230,7 +233,7 @@ public class cgeoApplicationTest extends CGeoTestCase {
}
/**
- * Test {@link cgBase#searchByOwner(String, String, int, boolean, CancellableHandler)}
+ * Test {@link GCParser#searchByOwner(String, CacheType, boolean, RecaptchaReceiver)}
*/
@MediumTest
public static void testSearchByOwner() {
@@ -247,7 +250,7 @@ public class cgeoApplicationTest extends CGeoTestCase {
}
/**
- * Test {@link cgBase#searchByUsername(String, String, int, boolean, CancellableHandler)}
+ * Test {@link GCParser#searchByUsername(String, CacheType, boolean, RecaptchaReceiver)}
*/
@MediumTest
public static void testSearchByUsername() {
@@ -264,7 +267,7 @@ public class cgeoApplicationTest extends CGeoTestCase {
}
/**
- * Test {@link cgBase#searchByViewport(String, Viewport)}
+ * Test {@link ConnectorFactory#searchByViewport(Viewport, String)}
*/
@MediumTest
public static void testSearchByViewport() {
@@ -278,7 +281,7 @@ public class cgeoApplicationTest extends CGeoTestCase {
try {
// set up settings required for test
- Settings.setExcludeMine(false);
+ TestSettings.setExcludeMine(false);
Settings.setCacheType(CacheType.ALL);
final GC2CJPF mockedCache = new GC2CJPF();
@@ -319,12 +322,12 @@ public class cgeoApplicationTest extends CGeoTestCase {
}
/**
- * Test {@link cgBase#searchByViewport(String, Viewport)}
+ * Test {@link ConnectorFactory#searchByViewport(Viewport, String)}
*/
@MediumTest
public static void testSearchByViewportNotLoggedIn() {
- final ImmutablePair<String, String> login = Settings.getLogin();
+ final ImmutablePair<String, String> login = Settings.getGcLogin();
final String memberStatus = Settings.getMemberStatus();
final Strategy strategy = Settings.getLiveMapStrategy();
final Strategy testStrategy = Strategy.FAST; // FASTEST, FAST or DETAILED for tests
@@ -367,7 +370,7 @@ public class cgeoApplicationTest extends CGeoTestCase {
} finally {
// restore user and password
- Settings.setLogin(login.left, login.right);
+ TestSettings.setLogin(login.left, login.right);
Settings.setMemberStatus(memberStatus);
Login.login();
Settings.setLiveMapStrategy(strategy);
@@ -410,9 +413,8 @@ public class cgeoApplicationTest extends CGeoTestCase {
Login.logout();
// Modify login data to avoid an automatic login again
- Settings.setLogin("c:geo", "c:geo");
+ TestSettings.setLogin("c:geo", "c:geo");
Settings.setMemberStatus("Basic member");
}
}
-