[android] #4487 - ArraysInOfBoundsException fix for addMarkers
This commit is contained in:
@@ -534,6 +534,23 @@ public class MapboxMapTest {
|
||||
assertTrue(mMapboxMap.getMarkers().contains(markerOptions2.getMarker()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAddMarkersEmpty() {
|
||||
List<MarkerOptions> markerList = new ArrayList<>();
|
||||
mMapboxMap.addMarkers(markerList);
|
||||
assertEquals("Markers size should be 0", 0, mMapboxMap.getMarkers().size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAddMarkersSingleMarker() {
|
||||
List<MarkerOptions> markerList = new ArrayList<>();
|
||||
MarkerOptions markerOptions = new MarkerOptions().title("a");
|
||||
markerList.add(markerOptions);
|
||||
mMapboxMap.addMarkers(markerList);
|
||||
assertEquals("Markers size should be 1", 1, mMapboxMap.getMarkers().size());
|
||||
assertTrue(mMapboxMap.getMarkers().contains(markerOptions.getMarker()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAddPolygon() {
|
||||
PolygonOptions polygonOptions = new PolygonOptions().add(new LatLng());
|
||||
|
||||
Reference in New Issue
Block a user