aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2013-01-07 21:50:10 +0100
committerSamuel Tardieu <sam@rfc1149.net>2013-01-07 21:50:10 +0100
commit3fb0e5f2d74b851836473a780a593cc7893cca9a (patch)
treeb5b621cd92483c0810524fc1e89385df573ecb2f /tests/src
parent34add6e4844c9de685a8a16c1f164e896fdb18be (diff)
downloadcgeo-3fb0e5f2d74b851836473a780a593cc7893cca9a.zip
cgeo-3fb0e5f2d74b851836473a780a593cc7893cca9a.tar.gz
cgeo-3fb0e5f2d74b851836473a780a593cc7893cca9a.tar.bz2
Refactoring: rename cgWaypoint into Waypoint
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/cgeo/geocaching/WaypointTest.java (renamed from tests/src/cgeo/geocaching/cgWaypointTest.java)16
-rw-r--r--tests/src/cgeo/geocaching/connector/gc/GCParserTest.java4
-rw-r--r--tests/src/cgeo/geocaching/files/GPXParserTest.java4
-rw-r--r--tests/src/cgeo/geocaching/ui/FormatterTest.java12
4 files changed, 18 insertions, 18 deletions
diff --git a/tests/src/cgeo/geocaching/cgWaypointTest.java b/tests/src/cgeo/geocaching/WaypointTest.java
index 6665c51..273a3bf 100644
--- a/tests/src/cgeo/geocaching/cgWaypointTest.java
+++ b/tests/src/cgeo/geocaching/WaypointTest.java
@@ -4,15 +4,15 @@ import cgeo.geocaching.enumerations.WaypointType;
import android.test.AndroidTestCase;
-public class cgWaypointTest extends AndroidTestCase {
+public class WaypointTest extends AndroidTestCase {
public static void testOrder() {
- final cgWaypoint cache = new cgWaypoint("Final", WaypointType.FINAL, false);
- final cgWaypoint trailhead = new cgWaypoint("Trail head", WaypointType.TRAILHEAD, false);
- final cgWaypoint stage = new cgWaypoint("stage", WaypointType.STAGE, false);
- final cgWaypoint puzzle = new cgWaypoint("puzzle", WaypointType.PUZZLE, false);
- final cgWaypoint own = new cgWaypoint("own", WaypointType.OWN, true);
- final cgWaypoint parking = new cgWaypoint("parking", WaypointType.PARKING, false);
+ final Waypoint cache = new Waypoint("Final", WaypointType.FINAL, false);
+ final Waypoint trailhead = new Waypoint("Trail head", WaypointType.TRAILHEAD, false);
+ final Waypoint stage = new Waypoint("stage", WaypointType.STAGE, false);
+ final Waypoint puzzle = new Waypoint("puzzle", WaypointType.PUZZLE, false);
+ final Waypoint own = new Waypoint("own", WaypointType.OWN, true);
+ final Waypoint parking = new Waypoint("parking", WaypointType.PARKING, false);
assertTrue(trailhead.compareTo(puzzle) < 0);
assertTrue(trailhead.compareTo(stage) < 0);
@@ -34,7 +34,7 @@ public class cgWaypointTest extends AndroidTestCase {
}
public static void testGeocode() {
- cgWaypoint waypoint = new cgWaypoint("Test waypoint", WaypointType.PARKING, false);
+ Waypoint waypoint = new Waypoint("Test waypoint", WaypointType.PARKING, false);
waypoint.setGeocode("p1");
assertEquals("P1", waypoint.getGeocode());
}
diff --git a/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java b/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java
index 0f1f4cf..80aa545 100644
--- a/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java
+++ b/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java
@@ -4,7 +4,7 @@ import cgeo.geocaching.SearchResult;
import cgeo.geocaching.Settings;
import cgeo.geocaching.cgCache;
import cgeo.geocaching.cgImage;
-import cgeo.geocaching.cgWaypoint;
+import cgeo.geocaching.Waypoint;
import cgeo.geocaching.enumerations.LoadFlags;
import cgeo.geocaching.enumerations.StatusCode;
import cgeo.geocaching.geopoint.Geopoint;
@@ -171,7 +171,7 @@ public class GCParserTest extends AbstractResourceInstrumentationTestCase {
private static void assertWaypointsFromNote(final cgCache cache, Geopoint[] expected, String note) {
cache.setPersonalNote(note);
- cache.setWaypoints(new ArrayList<cgWaypoint>(), false);
+ cache.setWaypoints(new ArrayList<Waypoint>(), false);
cache.parseWaypointsFromNote();
assertEquals(expected.length, cache.getWaypoints().size());
for (int i = 0; i < expected.length; i++) {
diff --git a/tests/src/cgeo/geocaching/files/GPXParserTest.java b/tests/src/cgeo/geocaching/files/GPXParserTest.java
index bf09256..bbb4514 100644
--- a/tests/src/cgeo/geocaching/files/GPXParserTest.java
+++ b/tests/src/cgeo/geocaching/files/GPXParserTest.java
@@ -5,7 +5,7 @@ import cgeo.geocaching.SearchResult;
import cgeo.geocaching.StoredList;
import cgeo.geocaching.cgCache;
import cgeo.geocaching.cgData;
-import cgeo.geocaching.cgWaypoint;
+import cgeo.geocaching.Waypoint;
import cgeo.geocaching.enumerations.CacheSize;
import cgeo.geocaching.enumerations.CacheType;
import cgeo.geocaching.enumerations.LoadFlags;
@@ -167,7 +167,7 @@ public class GPXParserTest extends AbstractResourceInstrumentationTestCase {
private static void assertGc31j2hWaypoints(final cgCache cache) {
assertNotNull(cache.getWaypoints());
assertEquals(2, cache.getWaypoints().size());
- cgWaypoint wp = cache.getWaypoints().get(1);
+ Waypoint wp = cache.getWaypoints().get(1);
assertEquals("GC31J2H", wp.getGeocode());
assertEquals("00", wp.getPrefix());
assertEquals("---", wp.getLookup());
diff --git a/tests/src/cgeo/geocaching/ui/FormatterTest.java b/tests/src/cgeo/geocaching/ui/FormatterTest.java
index 8f48abb..5546ea5 100644
--- a/tests/src/cgeo/geocaching/ui/FormatterTest.java
+++ b/tests/src/cgeo/geocaching/ui/FormatterTest.java
@@ -1,7 +1,7 @@
package cgeo.geocaching.ui;
import cgeo.geocaching.R;
-import cgeo.geocaching.cgWaypoint;
+import cgeo.geocaching.Waypoint;
import cgeo.geocaching.cgeoapplication;
import cgeo.geocaching.enumerations.WaypointType;
@@ -10,20 +10,20 @@ import android.test.AndroidTestCase;
public class FormatterTest extends AndroidTestCase {
public static void testParkingWaypoint() {
- assertFormatting(new cgWaypoint("you can park here", WaypointType.PARKING, false), WaypointType.PARKING.getL10n());
+ assertFormatting(new Waypoint("you can park here", WaypointType.PARKING, false), WaypointType.PARKING.getL10n());
}
public static void testOriginalWaypoint() {
- assertFormatting(new cgWaypoint("an original", WaypointType.ORIGINAL, false), WaypointType.ORIGINAL.getL10n());
+ assertFormatting(new Waypoint("an original", WaypointType.ORIGINAL, false), WaypointType.ORIGINAL.getL10n());
}
public static void testOwnWaypoint() {
- cgWaypoint own = new cgWaypoint("my own", WaypointType.OWN, true);
- own.setPrefix(cgWaypoint.PREFIX_OWN);
+ Waypoint own = new Waypoint("my own", WaypointType.OWN, true);
+ own.setPrefix(Waypoint.PREFIX_OWN);
assertFormatting(own, cgeoapplication.getInstance().getString(R.string.waypoint_custom));
}
- private static void assertFormatting(cgWaypoint waypoint, String expected) {
+ private static void assertFormatting(Waypoint waypoint, String expected) {
assertEquals(expected, Formatter.formatWaypointInfo(waypoint));
}