use of io.reactivex.rxjava3.internal.operators.observable.ObservableRange in project RxJava by ReactiveX.
the class RxJavaPluginsTest method observableCreate.
@SuppressWarnings("rawtypes")
@Test
public void observableCreate() {
try {
RxJavaPlugins.setOnObservableAssembly(new Function<Observable, Observable>() {
@Override
public Observable apply(Observable t) {
return new ObservableRange(1, 2);
}
});
Observable.range(10, 3).test().assertValues(1, 2).assertNoErrors().assertComplete();
} finally {
RxJavaPlugins.reset();
}
// make sure the reset worked
Observable.range(10, 3).test().assertValues(10, 11, 12).assertNoErrors().assertComplete();
}
Aggregations