Search in sources :

Example 1 with NearbyBaseMarker

use of fr.free.nrw.commons.nearby.NearbyBaseMarker in project apps-android-commons by commons-app.

the class NearbyControllerTest method testEmptyList.

@Test
public void testEmptyList() {
    LatLng location = new LatLng(0, 0, 0);
    List<Place> emptyList = new ArrayList<>();
    List<NearbyBaseMarker> options = NearbyController.loadAttractionsFromLocationToBaseMarkerOptions(location, emptyList, instrumentationContext);
    Assert.assertThat(options.size(), is(0));
}
Also used : NearbyBaseMarker(fr.free.nrw.commons.nearby.NearbyBaseMarker) ArrayList(java.util.ArrayList) LatLng(fr.free.nrw.commons.location.LatLng) Place(fr.free.nrw.commons.nearby.Place) Test(org.junit.Test)

Example 2 with NearbyBaseMarker

use of fr.free.nrw.commons.nearby.NearbyBaseMarker in project apps-android-commons by commons-app.

the class NearbyControllerTest method testNullAttractions.

@Test
public void testNullAttractions() {
    LatLng location = new LatLng(0, 0, 0);
    List<NearbyBaseMarker> options = NearbyController.loadAttractionsFromLocationToBaseMarkerOptions(location, null, instrumentationContext);
    Assert.assertThat(options.size(), is(0));
}
Also used : NearbyBaseMarker(fr.free.nrw.commons.nearby.NearbyBaseMarker) LatLng(fr.free.nrw.commons.location.LatLng) Test(org.junit.Test)

Aggregations

LatLng (fr.free.nrw.commons.location.LatLng)2 NearbyBaseMarker (fr.free.nrw.commons.nearby.NearbyBaseMarker)2 Test (org.junit.Test)2 Place (fr.free.nrw.commons.nearby.Place)1 ArrayList (java.util.ArrayList)1