Search in sources :

Example 6 with LatLng

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"));
}
Also used : LatLng(fr.free.nrw.commons.location.LatLng) Test(org.junit.Test)

Example 7 with LatLng

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"));
}
Also used : LatLng(fr.free.nrw.commons.location.LatLng) Test(org.junit.Test)

Example 8 with LatLng

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"));
}
Also used : LatLng(fr.free.nrw.commons.location.LatLng) Test(org.junit.Test)

Example 9 with LatLng

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"));
}
Also used : LatLng(fr.free.nrw.commons.location.LatLng) Test(org.junit.Test)

Example 10 with LatLng

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"));
}
Also used : LatLng(fr.free.nrw.commons.location.LatLng) Test(org.junit.Test)

Aggregations

LatLng (fr.free.nrw.commons.location.LatLng)22 Test (org.junit.Test)16 Bundle (android.os.Bundle)2 NearbyBaseMarker (fr.free.nrw.commons.nearby.NearbyBaseMarker)2 BufferedReader (java.io.BufferedReader)2 InputStreamReader (java.io.InputStreamReader)2 URL (java.net.URL)2 ArrayList (java.util.ArrayList)2 Uri (android.net.Uri)1 StrictMode (android.os.StrictMode)1 OnItemClick (butterknife.OnItemClick)1 Gson (com.google.gson.Gson)1 GsonBuilder (com.google.gson.GsonBuilder)1 Place (fr.free.nrw.commons.nearby.Place)1 UriDeserializer (fr.free.nrw.commons.utils.UriDeserializer)1 IOException (java.io.IOException)1 Type (java.lang.reflect.Type)1 URLConnection (java.net.URLConnection)1 List (java.util.List)1 Matcher (java.util.regex.Matcher)1