@Test public void success_shouldAddMarkerLayerOnce() throws Exception { fragment.createRouteToDestination(); fragment.success(new Route(getFixture("around_the_block"))); fragment.success(new Route(getFixture("around_the_block"))); assertThat(mapController.getMap().layers().contains(fragment.markers)).isTrue(); }
private void teardownLinedrawing() { mapController.getMap().events.unbind(mapListener); if (activeTask != null) { activeTask.cancel(true); } mapController.clearLines(); mapFragment.updateMap(); }
@Test public void onDetach_shouldRemovePath() throws Exception { fragment.createRouteToDestination(); Route testRoute = new Route(getFixture("around_the_block")); fragment.success(testRoute); fragment.onDetach(); assertThat(mapController.getMap().layers().contains(fragment.path)).isFalse(); }
@Test public void start_shouldClearBubbles() throws Exception { fragment.createRouteToDestination(); Route testRoute = new Route(getFixture("around_the_block")); fragment.success(testRoute); fragment.routingCircle.performClick(); assertThat(mapController.getMap().layers().contains(fragment.markers)).isFalse(); }
private void setupLinedrawing() { mapController.getMap().events.bind(mapListener); }