Search in sources :

Example 1 with FlowableRange

use of io.reactivex.internal.operators.flowable.FlowableRange in project RxJava by ReactiveX.

the class RxJavaPluginsTest method flowableCreate.

@SuppressWarnings("rawtypes")
@Test
public void flowableCreate() {
    try {
        RxJavaPlugins.setOnFlowableAssembly(new Function<Flowable, Flowable>() {

            @Override
            public Flowable apply(Flowable t) {
                return new FlowableRange(1, 2);
            }
        });
        Flowable.range(10, 3).test().assertValues(1, 2).assertNoErrors().assertComplete();
    } finally {
        RxJavaPlugins.reset();
    }
    // make sure the reset worked
    Flowable.range(10, 3).test().assertValues(10, 11, 12).assertNoErrors().assertComplete();
}
Also used : FlowableRange(io.reactivex.internal.operators.flowable.FlowableRange) ConnectableFlowable(io.reactivex.flowables.ConnectableFlowable) ParallelFlowable(io.reactivex.parallel.ParallelFlowable)

Aggregations

ConnectableFlowable (io.reactivex.flowables.ConnectableFlowable)1 FlowableRange (io.reactivex.internal.operators.flowable.FlowableRange)1 ParallelFlowable (io.reactivex.parallel.ParallelFlowable)1