aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/geocaching/twitter/TwitterTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/cgeo/geocaching/twitter/TwitterTest.java')
-rw-r--r--tests/src/cgeo/geocaching/twitter/TwitterTest.java21
1 files changed, 11 insertions, 10 deletions
diff --git a/tests/src/cgeo/geocaching/twitter/TwitterTest.java b/tests/src/cgeo/geocaching/twitter/TwitterTest.java
index 7ce0f09..f8a4f85 100644
--- a/tests/src/cgeo/geocaching/twitter/TwitterTest.java
+++ b/tests/src/cgeo/geocaching/twitter/TwitterTest.java
@@ -3,6 +3,7 @@ package cgeo.geocaching.twitter;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.Trackable;
import cgeo.geocaching.settings.Settings;
+import cgeo.geocaching.settings.TestSettings;
import junit.framework.TestCase;
@@ -11,39 +12,39 @@ public class TwitterTest extends TestCase {
public static void testTrackableMessage() {
final String oldMessage = Settings.getTrackableTwitterMessage();
try {
- Settings.setTrackableTwitterMessage("I touched [NAME] ([URL]).");
- Trackable tb = new Trackable();
- tb.setName("Travel bug");
- tb.setGeocode("TB1234");
- assertEquals("I touched Travel bug (http://www.geocaching.com//track/details.aspx?tracker=TB1234). #cgeo #geocaching", Twitter.getStatusMessage(tb));
+ TestSettings.setTrackableTwitterMessage("I touched [NAME] ([URL]).");
+ Trackable tb = new Trackable();
+ tb.setName("Travel bug");
+ tb.setGeocode("TB1234");
+ assertEquals("I touched Travel bug (http://www.geocaching.com//track/details.aspx?tracker=TB1234). #cgeo #geocaching", Twitter.getStatusMessage(tb));
} finally {
- Settings.setTrackableTwitterMessage(oldMessage);
+ TestSettings.setTrackableTwitterMessage(oldMessage);
}
}
public static void testCacheMessage() {
final String oldMessage = Settings.getCacheTwitterMessage();
try {
- Settings.setCacheTwitterMessage("I found [NAME] ([URL]).");
+ TestSettings.setCacheTwitterMessage("I found [NAME] ([URL]).");
Geocache cache = new Geocache();
cache.setGeocode("GC1234");
cache.setName("TwitterTest");
assertEquals("I found TwitterTest (http://coord.info/GC1234). #cgeo #geocaching", Twitter.getStatusMessage(cache));
} finally {
- Settings.setCacheTwitterMessage(oldMessage);
+ TestSettings.setCacheTwitterMessage(oldMessage);
}
}
public static void testAvoidDuplicateTags() {
final String oldMessage = Settings.getCacheTwitterMessage();
try {
- Settings.setCacheTwitterMessage("[NAME] #cgeo");
+ TestSettings.setCacheTwitterMessage("[NAME] #cgeo");
Geocache cache = new Geocache();
cache.setGeocode("GC1234");
cache.setName("TwitterTest");
assertEquals("TwitterTest #cgeo #geocaching", Twitter.getStatusMessage(cache));
} finally {
- Settings.setCacheTwitterMessage(oldMessage);
+ TestSettings.setCacheTwitterMessage(oldMessage);
}
}
}