[android] - do not update marker while creating (#6314)

* [android] - do not update marker while creating, add activity to prevent regression

* [core] - add asserts to incorrect usage of update and remove annotations api

* [android] - fix marker tests
This commit is contained in:
Tobrun
2016-09-20 03:03:49 +02:00
committed by John Firebaugh
parent 37cb2bd756
commit 72e3d6906d
8 changed files with 239 additions and 18 deletions

View File

@@ -590,10 +590,10 @@ public class MapboxMapTest {
MarkerOptions markerOptions2 = new MarkerOptions().position(new LatLng()).title("b");
markerList.add(markerOptions1);
markerList.add(markerOptions2);
mMapboxMap.addMarkers(markerList);
List<Marker> markers = mMapboxMap.addMarkers(markerList);
assertEquals("Markers size should be 2", 2, mMapboxMap.getMarkers().size());
assertTrue(mMapboxMap.getMarkers().contains(markerOptions1.getMarker()));
assertTrue(mMapboxMap.getMarkers().contains(markerOptions2.getMarker()));
assertTrue(mMapboxMap.getMarkers().contains(markers.get(0)));
assertTrue(mMapboxMap.getMarkers().contains(markers.get(1)));
}
@Test
@@ -608,9 +608,9 @@ public class MapboxMapTest {
List<BaseMarkerOptions> markerList = new ArrayList<>();
MarkerOptions markerOptions = new MarkerOptions().title("a").position(new LatLng());
markerList.add(markerOptions);
mMapboxMap.addMarkers(markerList);
List<Marker> markers = mMapboxMap.addMarkers(markerList);
assertEquals("Markers size should be 1", 1, mMapboxMap.getMarkers().size());
assertTrue(mMapboxMap.getMarkers().contains(markerOptions.getMarker()));
assertTrue(mMapboxMap.getMarkers().contains(markers.get(0)));
}
@Test