@Test public void refresh_shouldDisplaySuccess() { presenter.onRefresh(); verify(repository, times(1)).refreshPhotos(); verify(repository, times(1)).getPhotos(loadPhotosCallbackCaptor.capture()); loadPhotosCallbackCaptor.getValue().onPhotosLoaded(PHOTOS); final InOrder inOrder = Mockito.inOrder(view); inOrder.verify(view).setLoadingVisibility(true); inOrder.verify(view).setLoadingVisibility(false); verify(view, times(1)).showPhotos(photoListArgumentCaptor.capture()); final List<Photo> result = photoListArgumentCaptor.getValue(); assertThat(result, is(PHOTOS)); }
@Override public void onRefresh() { photoRepository.refreshPhotos(); loadPhotos(); }
PhotoListPresenter implements PhotoListContract.Presenter { @Override public void onRefresh() { photoRepository.refreshPhotos(); loadPhotos(); } }
PhotoListPresenter implements PhotoListContract.Presenter { @Override public void onRefresh() { photoRepository.refreshPhotos(); loadPhotos(); } PhotoListPresenter(PhotoListContract.View view, PhotoRepository photoRepository); }
PhotoListPresenter implements PhotoListContract.Presenter { @Override public void onRefresh() { photoRepository.refreshPhotos(); loadPhotos(); } PhotoListPresenter(PhotoListContract.View view, PhotoRepository photoRepository); @Override void loadPhotos(); @Override void onPhotoSelected(Photo selectedPhoto); @Override void onRefresh(); @Override void dropView(); }
PhotoListPresenter implements PhotoListContract.Presenter { @Override public void onRefresh() { photoRepository.refreshPhotos(); loadPhotos(); } PhotoListPresenter(PhotoListContract.View view, PhotoRepository photoRepository); @Override void loadPhotos(); @Override void onPhotoSelected(Photo selectedPhoto); @Override void onRefresh(); @Override void dropView();  }