@Test public void setRouteTo_successShouldDismissLoadingDialogUpon() throws Exception { fragment.createRouteToDestination(); fragment.success(new Route(getFixture("around_the_block"))); assertThat(activity.getMapFragment().getView().findViewById(R.id.map)).isVisible(); assertThat(activity.getMapFragment().getView().findViewById(R.id.progress)).isNotVisible(); }
@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 setRouteTo_shouldShowLoadingDialog() throws Exception { fragment.createRouteToDestination(); assertThat(activity.getMapFragment().getView().findViewById(R.id.progress)).isVisible(); }