@Test public void getSearchStateOnceAndStream_hasNoTerminalEvent() { defaultSearchDataModel.getSearchStateOnceAndStream() .test() .assertNotTerminated(); }
@Override @NonNull public Observable<SearchState> getSearchStateOnceAndStream() { return Observable.combineLatest(resultsOnceAndStream, errorOnceAndStream, inProgressOnceAndStream, SearchState::create) .observeOn(schedulerProvider.computation()) .distinctUntilChanged(); }
DefaultSearchDataModel implements SearchDataModel { @Override @NonNull public Observable<SearchState> getSearchStateOnceAndStream() { return Observable.combineLatest(resultsOnceAndStream, errorOnceAndStream, inProgressOnceAndStream, SearchState::create) .observeOn(schedulerProvider.computation()) .distinctUntilChanged(); } }
DefaultSearchDataModel implements SearchDataModel { @Override @NonNull public Observable<SearchState> getSearchStateOnceAndStream() { return Observable.combineLatest(resultsOnceAndStream, errorOnceAndStream, inProgressOnceAndStream, SearchState::create) .observeOn(schedulerProvider.computation()) .distinctUntilChanged(); } DefaultSearchDataModel(@NonNull final FreeSoundApiService freeSoundApiService,
                           @NonNull final SchedulerProvider schedulerProvider); }
DefaultSearchDataModel implements SearchDataModel { @Override @NonNull public Observable<SearchState> getSearchStateOnceAndStream() { return Observable.combineLatest(resultsOnceAndStream, errorOnceAndStream, inProgressOnceAndStream, SearchState::create) .observeOn(schedulerProvider.computation()) .distinctUntilChanged(); } DefaultSearchDataModel(@NonNull final FreeSoundApiService freeSoundApiService,
                           @NonNull final SchedulerProvider schedulerProvider); @NonNull @Override Completable querySearch(@NonNull final String query,
                                   @NonNull final Completable preliminaryTask); @Override @NonNull Observable<SearchState> getSearchStateOnceAndStream(); @Override @NonNull Completable clear(); }
DefaultSearchDataModel implements SearchDataModel { @Override @NonNull public Observable<SearchState> getSearchStateOnceAndStream() { return Observable.combineLatest(resultsOnceAndStream, errorOnceAndStream, inProgressOnceAndStream, SearchState::create) .observeOn(schedulerProvider.computation()) .distinctUntilChanged(); } DefaultSearchDataModel(@NonNull final FreeSoundApiService freeSoundApiService,
                           @NonNull final SchedulerProvider schedulerProvider); @NonNull @Override Completable querySearch(@NonNull final String query,
                                   @NonNull final Completable preliminaryTask); @Override @NonNull Observable<SearchState> getSearchStateOnceAndStream(); @Override @NonNull Completable clear();  }