use of io.reactivex.rxjava3.internal.operators.completable.CompletableError in project RxJava by ReactiveX.
the class RxJavaPluginsTest method completableCreate.
@Test
public void completableCreate() {
try {
RxJavaPlugins.setOnCompletableAssembly(new Function<Completable, Completable>() {
@Override
public Completable apply(Completable t) {
return new CompletableError(new TestException());
}
});
Completable.complete().test().assertNoValues().assertNotComplete().assertError(TestException.class);
} finally {
RxJavaPlugins.reset();
}
// make sure the reset worked
Completable.complete().test().assertNoValues().assertNoErrors().assertComplete();
}
Aggregations