use of fr.free.nrw.commons.location.LatLng in project apps-android-commons by commons-app.
the class LatLngTests method testLargerNumbers.
@Test
public void testLargerNumbers() {
LatLng place = new LatLng(120, 380, 0);
String prettyString = place.getPrettyCoordinateString();
Assert.assertThat(prettyString, is("90.0 N, 20.0 E"));
}
use of fr.free.nrw.commons.location.LatLng in project apps-android-commons by commons-app.
the class LatLngTests method testAntipode.
@Test
public void testAntipode() {
LatLng place = new LatLng(0, 180, 0);
String prettyString = place.getPrettyCoordinateString();
Assert.assertThat(prettyString, is("0.0 N, 180.0 W"));
}
use of fr.free.nrw.commons.location.LatLng in project apps-android-commons by commons-app.
the class LatLngTests method testNorthPole.
@Test
public void testNorthPole() {
LatLng place = new LatLng(90, 0, 0);
String prettyString = place.getPrettyCoordinateString();
Assert.assertThat(prettyString, is("90.0 N, 0.0 E"));
}
use of fr.free.nrw.commons.location.LatLng in project apps-android-commons by commons-app.
the class LatLngTests method testNegativeNumbers.
@Test
public void testNegativeNumbers() {
LatLng place = new LatLng(-120, -30, 0);
String prettyString = place.getPrettyCoordinateString();
Assert.assertThat(prettyString, is("90.0 S, 30.0 W"));
}
use of fr.free.nrw.commons.location.LatLng in project apps-android-commons by commons-app.
the class LatLngTests method testSouthPole.
@Test
public void testSouthPole() {
LatLng place = new LatLng(-90, 0, 0);
String prettyString = place.getPrettyCoordinateString();
Assert.assertThat(prettyString, is("90.0 S, 0.0 E"));
}
Aggregations