@Test public void getImportInfo() { when(importInfoTooltipManager.needToShowImportInfo()).thenReturn(Observable.just(true)); interactor.checkTooltipCauses() .test() .assertNoErrors() .assertValue(ReportTooltipUiIndicator.importInfo()); }
public Observable<ReportTooltipUiIndicator> checkTooltipCauses() { return Observable.combineLatest( getErrorStream() .doOnNext(syncErrorType -> { analytics.record(new DefaultDataPointEvent(Events.Sync.DisplaySyncError) .addDataPoint(new DataPoint(SyncErrorType.class.getName(), syncErrorType))); Logger.info(this, "Received sync error: {}.", syncErrorType); }) .flatMap(syncErrorType -> Observable.just(ReportTooltipUiIndicator.syncError(syncErrorType))) .startWith(ReportTooltipUiIndicator.none()), getInfoStream(), (errorUiIndicator, infoUiIndicator) -> errorUiIndicator.getState() != None ? errorUiIndicator : infoUiIndicator) .observeOn(AndroidSchedulers.mainThread()); }
ReportTooltipInteractor { public Observable<ReportTooltipUiIndicator> checkTooltipCauses() { return Observable.combineLatest( getErrorStream() .doOnNext(syncErrorType -> { analytics.record(new DefaultDataPointEvent(Events.Sync.DisplaySyncError) .addDataPoint(new DataPoint(SyncErrorType.class.getName(), syncErrorType))); Logger.info(this, "Received sync error: {}.", syncErrorType); }) .flatMap(syncErrorType -> Observable.just(ReportTooltipUiIndicator.syncError(syncErrorType))) .startWith(ReportTooltipUiIndicator.none()), getInfoStream(), (errorUiIndicator, infoUiIndicator) -> errorUiIndicator.getState() != None ? errorUiIndicator : infoUiIndicator) .observeOn(AndroidSchedulers.mainThread()); } }
ReportTooltipInteractor { public Observable<ReportTooltipUiIndicator> checkTooltipCauses() { return Observable.combineLatest( getErrorStream() .doOnNext(syncErrorType -> { analytics.record(new DefaultDataPointEvent(Events.Sync.DisplaySyncError) .addDataPoint(new DataPoint(SyncErrorType.class.getName(), syncErrorType))); Logger.info(this, "Received sync error: {}.", syncErrorType); }) .flatMap(syncErrorType -> Observable.just(ReportTooltipUiIndicator.syncError(syncErrorType))) .startWith(ReportTooltipUiIndicator.none()), getInfoStream(), (errorUiIndicator, infoUiIndicator) -> errorUiIndicator.getState() != None ? errorUiIndicator : infoUiIndicator) .observeOn(AndroidSchedulers.mainThread()); } @Inject  ReportTooltipInteractor(T activity, NavigationHandler navigationHandler,
                                   BackupProvidersManager backupProvidersManager,
                                   Analytics analytics, GenerateInfoTooltipManager infoTooltipManager,
                                   BackupReminderTooltipManager backupReminderTooltipManager,
                                   ImportInfoTooltipManager importInfoTooltipManager); }
ReportTooltipInteractor { public Observable<ReportTooltipUiIndicator> checkTooltipCauses() { return Observable.combineLatest( getErrorStream() .doOnNext(syncErrorType -> { analytics.record(new DefaultDataPointEvent(Events.Sync.DisplaySyncError) .addDataPoint(new DataPoint(SyncErrorType.class.getName(), syncErrorType))); Logger.info(this, "Received sync error: {}.", syncErrorType); }) .flatMap(syncErrorType -> Observable.just(ReportTooltipUiIndicator.syncError(syncErrorType))) .startWith(ReportTooltipUiIndicator.none()), getInfoStream(), (errorUiIndicator, infoUiIndicator) -> errorUiIndicator.getState() != None ? errorUiIndicator : infoUiIndicator) .observeOn(AndroidSchedulers.mainThread()); } @Inject  ReportTooltipInteractor(T activity, NavigationHandler navigationHandler,
                                   BackupProvidersManager backupProvidersManager,
                                   Analytics analytics, GenerateInfoTooltipManager infoTooltipManager,
                                   BackupReminderTooltipManager backupReminderTooltipManager,
                                   ImportInfoTooltipManager importInfoTooltipManager); Observable<ReportTooltipUiIndicator> checkTooltipCauses(); void handleClickOnErrorTooltip(@NonNull SyncErrorType syncErrorType); void generateInfoTooltipClosed(); void backupReminderTooltipClosed(); void importInfoTooltipClosed(); }
ReportTooltipInteractor { public Observable<ReportTooltipUiIndicator> checkTooltipCauses() { return Observable.combineLatest( getErrorStream() .doOnNext(syncErrorType -> { analytics.record(new DefaultDataPointEvent(Events.Sync.DisplaySyncError) .addDataPoint(new DataPoint(SyncErrorType.class.getName(), syncErrorType))); Logger.info(this, "Received sync error: {}.", syncErrorType); }) .flatMap(syncErrorType -> Observable.just(ReportTooltipUiIndicator.syncError(syncErrorType))) .startWith(ReportTooltipUiIndicator.none()), getInfoStream(), (errorUiIndicator, infoUiIndicator) -> errorUiIndicator.getState() != None ? errorUiIndicator : infoUiIndicator) .observeOn(AndroidSchedulers.mainThread()); } @Inject  ReportTooltipInteractor(T activity, NavigationHandler navigationHandler,
                                   BackupProvidersManager backupProvidersManager,
                                   Analytics analytics, GenerateInfoTooltipManager infoTooltipManager,
                                   BackupReminderTooltipManager backupReminderTooltipManager,
                                   ImportInfoTooltipManager importInfoTooltipManager); Observable<ReportTooltipUiIndicator> checkTooltipCauses(); void handleClickOnErrorTooltip(@NonNull SyncErrorType syncErrorType); void generateInfoTooltipClosed(); void backupReminderTooltipClosed(); void importInfoTooltipClosed();  }