@Test public void unsubscribeEmitsAnIdleEventButIgnoresTheRest() { presenter.unsubscribe(); verify(view, times(2)).displayOcrStatus(UiIndicator.idle()); ocrProcessingStatusEvents.onNext(OcrProcessingStatus.UploadingImage); ocrProcessingStatusEvents.onNext(OcrProcessingStatus.PerformingScan); ocrProcessingStatusEvents.onNext(OcrProcessingStatus.RetrievingResults); verifyNoMoreInteractions(view); }
@Override public void unsubscribe() { view.displayOcrStatus(UiIndicator.idle()); super.unsubscribe(); }
OcrStatusAlerterPresenter extends BasePresenter<OcrStatusAlerterView> { @Override public void unsubscribe() { view.displayOcrStatus(UiIndicator.idle()); super.unsubscribe(); } }
OcrStatusAlerterPresenter extends BasePresenter<OcrStatusAlerterView> { @Override public void unsubscribe() { view.displayOcrStatus(UiIndicator.idle()); super.unsubscribe(); } @Inject  OcrStatusAlerterPresenter(@NonNull OcrStatusAlerterView view, @NonNull Context context, @NonNull OcrManager ocrManager); }
OcrStatusAlerterPresenter extends BasePresenter<OcrStatusAlerterView> { @Override public void unsubscribe() { view.displayOcrStatus(UiIndicator.idle()); super.unsubscribe(); } @Inject  OcrStatusAlerterPresenter(@NonNull OcrStatusAlerterView view, @NonNull Context context, @NonNull OcrManager ocrManager); @Override void subscribe(); @Override void unsubscribe(); }
OcrStatusAlerterPresenter extends BasePresenter<OcrStatusAlerterView> { @Override public void unsubscribe() { view.displayOcrStatus(UiIndicator.idle()); super.unsubscribe(); } @Inject  OcrStatusAlerterPresenter(@NonNull OcrStatusAlerterView view, @NonNull Context context, @NonNull OcrManager ocrManager); @Override void subscribe(); @Override void unsubscribe();  }