@Override public Completable apply(Integer v) throws Exception { return Completable.complete(); } })
@Override public CompletableSource apply(Integer v) throws Exception { return Completable.complete(); } }, false, Integer.MAX_VALUE)
@Override public CompletableSource apply(Integer v) throws Exception { return Completable.complete(); } }))
@Override public CompletableSource apply(Integer v) throws Exception { return Completable.complete(); } })
@Override public CompletableSource apply(Integer v) throws Exception { return Completable.complete(); } }, false, Integer.MAX_VALUE)
@Override public CompletableSource apply(Integer v) throws Exception { return Completable.complete(); } }).<Integer>toObservable()
@Override public CompletableSource apply(Integer v) throws Exception { return Completable.complete(); } }).toObservable());
@Override public CompletableSource apply(Integer v) throws Exception { return Completable.complete(); } }, true)
@Override public CompletableSource apply(Integer v) throws Exception { return Completable.complete(); } }));
@Override public CompletableSource apply(Integer v) throws Exception { return Completable.complete(); } })
@Override public CompletableSource apply(Integer v) throws Exception { return Completable.complete(); } })
@Override public CompletableSource apply(Integer v) throws Exception { return Completable.complete(); } }));
@Override public void run() throws Exception { Completable.complete().delay(10, TimeUnit.SECONDS).blockingGet(); } })
@Test public void ambLots() { List<Completable> ms = new ArrayList<Completable>(); for (int i = 0; i < 32; i++) { ms.add(Completable.never()); } ms.add(Completable.complete()); Completable.amb(ms) .test() .assertResult(); }
@Test public void invalidPrefetch() { try { Completable.merge(Observable.just(Completable.complete()), -99); fail("Should have thrown IllegalArgumentExceptio"); } catch (IllegalArgumentException ex) { assertEquals("maxConcurrency > 0 required but it was -99", ex.getMessage()); } }
@Override protected void subscribeActual(Subscriber<? super Completable> s) { s.onSubscribe(new BooleanSubscription()); s.onNext(Completable.complete()); s.onError(new TestException("First")); s.onError(new TestException("Second")); } })
@Test public void syncFusedUnboundedIn() { concatCompletable(Flowable.just(Completable.complete()), Integer.MAX_VALUE) .test() .assertResult(); }
@Test public void completeAfterMain() { CompletableSubject pp = CompletableSubject.create(); TestObserver<Void> to = Completable.mergeArray(Completable.complete(), pp) .test(); pp.onComplete(); to.assertResult(); }
@Override protected void subscribeActual(Observer<? super Completable> s) { s.onSubscribe(Disposables.empty()); s.onNext(Completable.complete()); s.onError(new TestException("First")); s.onError(new TestException("Second")); } })
@Test public void andThen() { TestObserver<String> to = new TestObserver<String>(); Completable.complete().andThen(Observable.just("foo")).subscribe(to); to.assertValue("foo"); to.assertComplete(); to.assertNoErrors(); }