@Test public void settingsNotSatisfied_NoLastLocation() { doReturn(Single.just(false)).when(locationSettings).checkAndHandleResolution(Matchers.any(LocationRequest.class)); doReturn(Maybe.empty()).when(fusedLocation).lastLocation(); mainPresenter.attachView(mainView); verify(mainView).onLocationSettingsUnsuccessful(); verifyNoMoreInteractions(mainView); }
public void attachView(MainView view) { this.view = view; startLocationRefresh(); }
MainPresenter { public void attachView(MainView view) { this.view = view; startLocationRefresh(); } }
MainPresenter { public void attachView(MainView view) { this.view = view; startLocationRefresh(); } MainPresenter(RxLocation rxLocation); }
MainPresenter { public void attachView(MainView view) { this.view = view; startLocationRefresh(); } MainPresenter(RxLocation rxLocation); void attachView(MainView view); void detachView(); void startLocationRefresh(); }
MainPresenter { public void attachView(MainView view) { this.view = view; startLocationRefresh(); } MainPresenter(RxLocation rxLocation); void attachView(MainView view); void detachView(); void startLocationRefresh();  }