@Test public void handleRetryClickTest() { presenter.handleRetryClick(); when(editorialListManager.loadEditorialListViewModel(false, true)).thenReturn( Single.just(successEditorialViewModel)); lifecycleEvent.onNext(View.LifecycleEvent.CREATE); retryClickedEvent.onNext(null); verify(view).update(successEditorialViewModel.getCurationCards()); verify(view).hideLoading(); verify(view).hideLoadMore(); }
@VisibleForTesting public void handleRetryClick() { view.getLifecycleEvent() .filter(lifecycleEvent -> lifecycleEvent.equals(View.LifecycleEvent.CREATE)) .flatMap(viewCreated -> view.retryClicked() .observeOn(viewScheduler) .doOnNext(bottom -> view.showLoading()) .flatMap(__ -> loadEditorialAndReactions(false, true))) .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) .subscribe(notificationUrl -> { }, crashReporter::log); }
EditorialListPresenter implements Presenter { @VisibleForTesting public void handleRetryClick() { view.getLifecycleEvent() .filter(lifecycleEvent -> lifecycleEvent.equals(View.LifecycleEvent.CREATE)) .flatMap(viewCreated -> view.retryClicked() .observeOn(viewScheduler) .doOnNext(bottom -> view.showLoading()) .flatMap(__ -> loadEditorialAndReactions(false, true))) .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) .subscribe(notificationUrl -> { }, crashReporter::log); } }
EditorialListPresenter implements Presenter { @VisibleForTesting public void handleRetryClick() { view.getLifecycleEvent() .filter(lifecycleEvent -> lifecycleEvent.equals(View.LifecycleEvent.CREATE)) .flatMap(viewCreated -> view.retryClicked() .observeOn(viewScheduler) .doOnNext(bottom -> view.showLoading()) .flatMap(__ -> loadEditorialAndReactions(false, true))) .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) .subscribe(notificationUrl -> { }, crashReporter::log); } EditorialListPresenter(EditorialListView editorialListView,
      EditorialListManager editorialListManager, AptoideAccountManager accountManager,
      EditorialListNavigator editorialListNavigator, EditorialListAnalytics editorialListAnalytics,
      CrashReport crashReporter, Scheduler viewScheduler,
      UserFeedbackAnalytics userFeedbackAnalytics); }
EditorialListPresenter implements Presenter { @VisibleForTesting public void handleRetryClick() { view.getLifecycleEvent() .filter(lifecycleEvent -> lifecycleEvent.equals(View.LifecycleEvent.CREATE)) .flatMap(viewCreated -> view.retryClicked() .observeOn(viewScheduler) .doOnNext(bottom -> view.showLoading()) .flatMap(__ -> loadEditorialAndReactions(false, true))) .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) .subscribe(notificationUrl -> { }, crashReporter::log); } EditorialListPresenter(EditorialListView editorialListView,
      EditorialListManager editorialListManager, AptoideAccountManager accountManager,
      EditorialListNavigator editorialListNavigator, EditorialListAnalytics editorialListAnalytics,
      CrashReport crashReporter, Scheduler viewScheduler,
      UserFeedbackAnalytics userFeedbackAnalytics); @Override void present(); @VisibleForTesting void onCreateLoadViewModel(); @VisibleForTesting void loadUserImage(); @VisibleForTesting void handleEditorialCardClick(); @VisibleForTesting void handlePullToRefresh(); @VisibleForTesting void handleRetryClick(); @VisibleForTesting void handleImpressions(); @VisibleForTesting void handleBottomReached(); @VisibleForTesting void handleUserImageClick(); @VisibleForTesting void handleReactionButtonClick(); @VisibleForTesting void handleUserReaction(); @VisibleForTesting void handleSnackLogInClick(); }
EditorialListPresenter implements Presenter { @VisibleForTesting public void handleRetryClick() { view.getLifecycleEvent() .filter(lifecycleEvent -> lifecycleEvent.equals(View.LifecycleEvent.CREATE)) .flatMap(viewCreated -> view.retryClicked() .observeOn(viewScheduler) .doOnNext(bottom -> view.showLoading()) .flatMap(__ -> loadEditorialAndReactions(false, true))) .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) .subscribe(notificationUrl -> { }, crashReporter::log); } EditorialListPresenter(EditorialListView editorialListView,
      EditorialListManager editorialListManager, AptoideAccountManager accountManager,
      EditorialListNavigator editorialListNavigator, EditorialListAnalytics editorialListAnalytics,
      CrashReport crashReporter, Scheduler viewScheduler,
      UserFeedbackAnalytics userFeedbackAnalytics); @Override void present(); @VisibleForTesting void onCreateLoadViewModel(); @VisibleForTesting void loadUserImage(); @VisibleForTesting void handleEditorialCardClick(); @VisibleForTesting void handlePullToRefresh(); @VisibleForTesting void handleRetryClick(); @VisibleForTesting void handleImpressions(); @VisibleForTesting void handleBottomReached(); @VisibleForTesting void handleUserImageClick(); @VisibleForTesting void handleReactionButtonClick(); @VisibleForTesting void handleUserReaction(); @VisibleForTesting void handleSnackLogInClick();  }