Search in sources :

Example 1 with CompletableError

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();
}
Also used : CompletableError(io.reactivex.rxjava3.internal.operators.completable.CompletableError) Test(org.junit.Test)

Aggregations

CompletableError (io.reactivex.rxjava3.internal.operators.completable.CompletableError)1 Test (org.junit.Test)1