@Test public void draftsFromRepoAreUnwrappedAndPassedOn() { List<CreditDraft> testDraftList = createTestDraftList(); interactor.getBehaviorStream(Option.none()).subscribe(ts); arrangeBuilder.emitDraftListFromRepo(Option.ofObj(testDraftList)); ts.assertNotTerminated(); ts.assertValue(testDraftList); }
@NonNull @Override public Observable<List<CreditDraft>> getBehaviorStream(@NonNull final Option<Void> params) { return creditRepository.getAllCreditDrafts() .flatMapSingle(this::fetchWhenNoneAndThenDrafts) .compose(UnwrapOptionTransformer.create()); }
RetrieveCreditDraftList implements RetrieveInteractor<Void, List<CreditDraft>> { @NonNull @Override public Observable<List<CreditDraft>> getBehaviorStream(@NonNull final Option<Void> params) { return creditRepository.getAllCreditDrafts() .flatMapSingle(this::fetchWhenNoneAndThenDrafts) .compose(UnwrapOptionTransformer.create()); } }
RetrieveCreditDraftList implements RetrieveInteractor<Void, List<CreditDraft>> { @NonNull @Override public Observable<List<CreditDraft>> getBehaviorStream(@NonNull final Option<Void> params) { return creditRepository.getAllCreditDrafts() .flatMapSingle(this::fetchWhenNoneAndThenDrafts) .compose(UnwrapOptionTransformer.create()); } @Inject  RetrieveCreditDraftList(@NonNull final CreditRepository creditRepository); }
RetrieveCreditDraftList implements RetrieveInteractor<Void, List<CreditDraft>> { @NonNull @Override public Observable<List<CreditDraft>> getBehaviorStream(@NonNull final Option<Void> params) { return creditRepository.getAllCreditDrafts() .flatMapSingle(this::fetchWhenNoneAndThenDrafts) .compose(UnwrapOptionTransformer.create()); } @Inject  RetrieveCreditDraftList(@NonNull final CreditRepository creditRepository); @NonNull @Override Observable<List<CreditDraft>> getBehaviorStream(@NonNull final Option<Void> params); }
RetrieveCreditDraftList implements RetrieveInteractor<Void, List<CreditDraft>> { @NonNull @Override public Observable<List<CreditDraft>> getBehaviorStream(@NonNull final Option<Void> params) { return creditRepository.getAllCreditDrafts() .flatMapSingle(this::fetchWhenNoneAndThenDrafts) .compose(UnwrapOptionTransformer.create()); } @Inject  RetrieveCreditDraftList(@NonNull final CreditRepository creditRepository); @NonNull @Override Observable<List<CreditDraft>> getBehaviorStream(@NonNull final Option<Void> params);  }