@Test public void testGetFluxWeed() { TestObserver<Object> testObserver = TestObserver.create(); magicalDataSource.getFluxWeed().subscribe(testObserver); testObserver.awaitTerminalEvent(); testObserver.assertNoErrors(); testObserver.assertComplete(); }
@Override public Observable<FluxWeed> getFluxWeed() { return Observable.just(new FluxWeed()) .delay(randomizer.randomInRange(2, 5), TimeUnit.SECONDS); }
MagicalRemoteDataSource implements MagicalDataSource { @Override public Observable<FluxWeed> getFluxWeed() { return Observable.just(new FluxWeed()) .delay(randomizer.randomInRange(2, 5), TimeUnit.SECONDS); } }
MagicalRemoteDataSource implements MagicalDataSource { @Override public Observable<FluxWeed> getFluxWeed() { return Observable.just(new FluxWeed()) .delay(randomizer.randomInRange(2, 5), TimeUnit.SECONDS); } @Inject  MagicalRemoteDataSource(Randomizer randomizer); }
MagicalRemoteDataSource implements MagicalDataSource { @Override public Observable<FluxWeed> getFluxWeed() { return Observable.just(new FluxWeed()) .delay(randomizer.randomInRange(2, 5), TimeUnit.SECONDS); } @Inject  MagicalRemoteDataSource(Randomizer randomizer); @Override Observable<FluxWeed> getFluxWeed(); @Override Flowable<FluxWeed> getFluxWeedFlowable(); }
MagicalRemoteDataSource implements MagicalDataSource { @Override public Observable<FluxWeed> getFluxWeed() { return Observable.just(new FluxWeed()) .delay(randomizer.randomInRange(2, 5), TimeUnit.SECONDS); } @Inject  MagicalRemoteDataSource(Randomizer randomizer); @Override Observable<FluxWeed> getFluxWeed(); @Override Flowable<FluxWeed> getFluxWeedFlowable();  }