예제 #1
0
 @Test
 public void onItemSingleTapUp_shouldNotifyListener() throws Exception {
   ItemizedLayer<MarkerItem> poiLayer = mapFragment.getPoiLayer();
   poiLayer.addItem(new MarkerItem("Title", "Description", new GeoPoint(0, 0)));
   poiLayer.onGesture(Gesture.TAP, new FakeMotionEvent(0, 0));
   assertThat(listener.getIndex()).isEqualTo(0);
   assertThat(listener.getItem().getTitle()).isEqualTo("Title");
 }
예제 #2
0
 @Test
 public void clearMarkers_shouldEmptyMapPois() throws Exception {
   mapFragment.addPoi(getTestSimpleFeature());
   mapFragment.addPoi(getTestSimpleFeature());
   ItemizedLayer<MarkerItem> poiMarkerLayer = mapFragment.getPoiLayer();
   mapFragment.clearMarkers();
   assertThat(poiMarkerLayer.size()).isZero();
 }
예제 #3
0
 @Test
 public void onPause_shouldEmptyPoiMarkers() throws Exception {
   mapFragment.addPoi(getTestSimpleFeature());
   mapFragment.addPoi(getTestSimpleFeature());
   ItemizedLayer<MarkerItem> poiMarkerLayer = mapFragment.getPoiLayer();
   mapFragment.onPause();
   assertThat(poiMarkerLayer.size()).isEqualTo(0);
 }
예제 #4
0
 @Test
 public void shouldHavePoiLayer() throws Exception {
   assertThat(mapFragment.getPoiLayer()).isNotNull();
 }