diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2014-11-02 11:07:28 +0100 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2014-11-02 11:07:28 +0100 |
| commit | 7c95d28947a9ed8f003bfaef147f2fb72dc4b6ab (patch) | |
| tree | d1c1abf0ff3bb2b0d2296ca185a634d0c6ebcea5 /tests/src/cgeo/geocaching/geopoint/GeoPointFormatterTest.java | |
| parent | 5dadcf6d74d5d73b6beb3883df219b69a2c337fb (diff) | |
| download | cgeo-7c95d28947a9ed8f003bfaef147f2fb72dc4b6ab.zip cgeo-7c95d28947a9ed8f003bfaef147f2fb72dc4b6ab.tar.gz cgeo-7c95d28947a9ed8f003bfaef147f2fb72dc4b6ab.tar.bz2 | |
rename package
The package not only contains the GeoPoint definition, but other
location related classes, too.
Diffstat (limited to 'tests/src/cgeo/geocaching/geopoint/GeoPointFormatterTest.java')
| -rw-r--r-- | tests/src/cgeo/geocaching/geopoint/GeoPointFormatterTest.java | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/src/cgeo/geocaching/geopoint/GeoPointFormatterTest.java b/tests/src/cgeo/geocaching/geopoint/GeoPointFormatterTest.java deleted file mode 100644 index 2816664..0000000 --- a/tests/src/cgeo/geocaching/geopoint/GeoPointFormatterTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package cgeo.geocaching.geopoint; - -import static org.assertj.core.api.Assertions.assertThat; - -import cgeo.geocaching.utils.Formatter; - -import android.test.AndroidTestCase; - -public class GeoPointFormatterTest extends AndroidTestCase { - - public static void testConfluence() { - // From issue #2624: coordinate is wrong near to a confluence point - final Geopoint point = new Geopoint(49.9999999999999, 5.0); - final String format = GeopointFormatter.format(GeopointFormatter.Format.LAT_LON_DECDEGREE_COMMA, point); - assertThat(format).isEqualTo("50.000000,5.000000"); - final String formatMinute = GeopointFormatter.format(GeopointFormatter.Format.LAT_LON_DECMINUTE_RAW, point); - assertThat(formatMinute).isEqualTo("N 50° 00.000 E 005° 00.000"); - final String formatSecond = GeopointFormatter.format(GeopointFormatter.Format.LAT_LON_DECSECOND, point).replaceAll(",", "."); - assertEquals(formatSecond, "N 50° 00' 00.000\"" + Formatter.SEPARATOR + "E 005° 00' 00.000\"", formatSecond); - } - - public static void testFormat() { - // taken from GC30R6G - final Geopoint point = new Geopoint("N 51° 21.104 E 010° 15.369"); - final String format = GeopointFormatter.format(GeopointFormatter.Format.LAT_LON_DECDEGREE_COMMA, point); - assertEquals(format, "51.351733,10.256150", format); - final String formatMinute = GeopointFormatter.format(GeopointFormatter.Format.LAT_LON_DECMINUTE_RAW, point); - assertEquals(formatMinute, "N 51° 21.104 E 010° 15.369", formatMinute); - final String formatSecond = GeopointFormatter.format(GeopointFormatter.Format.LAT_LON_DECSECOND, point).replaceAll(",", "."); - assertEquals(formatSecond, "N 51° 21' 06.240\"" + Formatter.SEPARATOR + "E 010° 15' 22.140\"", formatSecond); - } - -} |
