use of io.reactivex.rxjava3.internal.util.AtomicThrowable in project RxJava by ReactiveX.
the class AtomicThrowableTest method tryTerminateConsumerCompletableObserverError.
@Test
public void tryTerminateConsumerCompletableObserverError() {
TestObserver<Object> to = new TestObserver<>();
to.onSubscribe(Disposable.empty());
AtomicThrowable ex = new AtomicThrowable();
ex.set(new TestException());
ex.tryTerminateConsumer((CompletableObserver) to);
to.assertFailure(TestException.class);
}
use of io.reactivex.rxjava3.internal.util.AtomicThrowable in project RxJava by ReactiveX.
the class AtomicThrowableTest method tryTerminateConsumerSubscriberError.
@Test
public void tryTerminateConsumerSubscriberError() {
TestSubscriber<Object> ts = new TestSubscriber<>();
ts.onSubscribe(new BooleanSubscription());
AtomicThrowable ex = new AtomicThrowable();
ex.set(new TestException());
ex.tryTerminateConsumer(ts);
ts.assertFailure(TestException.class);
}
use of io.reactivex.rxjava3.internal.util.AtomicThrowable in project RxJava by ReactiveX.
the class AtomicThrowableTest method tryTerminateConsumerSingleError.
@Test
public void tryTerminateConsumerSingleError() {
TestObserver<Object> to = new TestObserver<>();
to.onSubscribe(Disposable.empty());
AtomicThrowable ex = new AtomicThrowable();
ex.set(new TestException());
ex.tryTerminateConsumer((SingleObserver<Object>) to);
to.assertFailure(TestException.class);
}
use of io.reactivex.rxjava3.internal.util.AtomicThrowable in project RxJava by ReactiveX.
the class AtomicThrowableTest method tryTerminateConsumerMaybeObserverError.
@Test
public void tryTerminateConsumerMaybeObserverError() {
TestObserver<Object> to = new TestObserver<>();
to.onSubscribe(Disposable.empty());
AtomicThrowable ex = new AtomicThrowable();
ex.set(new TestException());
ex.tryTerminateConsumer((MaybeObserver<Object>) to);
to.assertFailure(TestException.class);
}
use of io.reactivex.rxjava3.internal.util.AtomicThrowable in project RxJava by ReactiveX.
the class AtomicThrowableTest method tryTerminateConsumerObserverError.
@Test
public void tryTerminateConsumerObserverError() {
TestObserver<Object> to = new TestObserver<>();
to.onSubscribe(Disposable.empty());
AtomicThrowable ex = new AtomicThrowable();
ex.set(new TestException());
ex.tryTerminateConsumer((Observer<Object>) to);
to.assertFailure(TestException.class);
}
Aggregations