use of io.reactivex.rxjava3.observers in project RxJava by ReactiveX.
the class FlowableMergeWithCompletableTest method cancelMainOnOtherError.
@Test
public void cancelMainOnOtherError() {
PublishProcessor<Integer> pp = PublishProcessor.create();
CompletableSubject cs = CompletableSubject.create();
TestSubscriber<Integer> ts = pp.mergeWith(cs).test();
assertTrue(pp.hasSubscribers());
assertTrue(cs.hasObservers());
cs.onError(new TestException());
ts.assertFailure(TestException.class);
assertFalse("main has observers!", pp.hasSubscribers());
assertFalse("other has observers", cs.hasObservers());
}
use of io.reactivex.rxjava3.observers in project RxJava by ReactiveX.
the class FlowableMergeWithCompletableTest method cancelOtherOnMainError.
@Test
public void cancelOtherOnMainError() {
PublishProcessor<Integer> pp = PublishProcessor.create();
CompletableSubject cs = CompletableSubject.create();
TestSubscriber<Integer> ts = pp.mergeWith(cs).test();
assertTrue(pp.hasSubscribers());
assertTrue(cs.hasObservers());
pp.onError(new TestException());
ts.assertFailure(TestException.class);
assertFalse("main has observers!", pp.hasSubscribers());
assertFalse("other has observers", cs.hasObservers());
}
use of io.reactivex.rxjava3.observers in project RxJava by ReactiveX.
the class FlowableMergeWithMaybeTest method cancelOtherOnMainError.
@Test
public void cancelOtherOnMainError() {
PublishProcessor<Integer> pp = PublishProcessor.create();
MaybeSubject<Integer> ms = MaybeSubject.create();
TestSubscriber<Integer> ts = pp.mergeWith(ms).test();
assertTrue(pp.hasSubscribers());
assertTrue(ms.hasObservers());
pp.onError(new TestException());
ts.assertFailure(TestException.class);
assertFalse("main has observers!", pp.hasSubscribers());
assertFalse("other has observers", ms.hasObservers());
}
use of io.reactivex.rxjava3.observers in project RxJava by ReactiveX.
the class ObservableMergeWithMaybeTest method cancelOtherOnMainError.
@Test
public void cancelOtherOnMainError() {
PublishSubject<Integer> ps = PublishSubject.create();
MaybeSubject<Integer> ms = MaybeSubject.create();
TestObserver<Integer> to = ps.mergeWith(ms).test();
assertTrue(ps.hasObservers());
assertTrue(ms.hasObservers());
ps.onError(new TestException());
to.assertFailure(TestException.class);
assertFalse("main has observers!", ps.hasObservers());
assertFalse("other has observers", ms.hasObservers());
}
use of io.reactivex.rxjava3.observers in project RxJava by ReactiveX.
the class ObservableMergeWithCompletableTest method cancelOtherOnMainError.
@Test
public void cancelOtherOnMainError() {
PublishSubject<Integer> ps = PublishSubject.create();
CompletableSubject cs = CompletableSubject.create();
TestObserver<Integer> to = ps.mergeWith(cs).test();
assertTrue(ps.hasObservers());
assertTrue(cs.hasObservers());
ps.onError(new TestException());
to.assertFailure(TestException.class);
assertFalse("main has observers!", ps.hasObservers());
assertFalse("other has observers", cs.hasObservers());
}
Aggregations