@Test public void setRouteTo_failureShouldDismissLoadingDialogUpon() throws Exception { fragment.createRouteToDestination(); fragment.failure(500); assertThat(activity.getMapFragment().getView().findViewById(R.id.map)).isVisible(); assertThat(activity.getMapFragment().getView().findViewById(R.id.progress)).isNotVisible(); }
@Test public void failure_shouldClearPreviousRoutes() throws Exception { fragment.createRouteToDestination(); fragment.success(new Route(getFixture("around_the_block"))); fragment.createRouteToDestination(); fragment.failure(500); assertThat(fragment.path.getPoints()).isEmpty(); }