@Test public void negativeRequest() { TestSubscriber<Object> ts = new TestSubscriber<>(); Single.never() .observeOn(executor) .subscribe(ts); ts.getSubcription().request(-1L); ts.awaitDone(5, TimeUnit.SECONDS) .assertFailure(IllegalArgumentException.class); }
@Override public void subscribe(Flow.Subscriber<? super T> subscriber) { source.subscribe(new ObserveOnSubscriber<>(subscriber, executor)); }
SingleObserveOn extends CompletionSingle<T> { @Override public void subscribe(Flow.Subscriber<? super T> subscriber) { source.subscribe(new ObserveOnSubscriber<>(subscriber, executor)); } }
SingleObserveOn extends CompletionSingle<T> { @Override public void subscribe(Flow.Subscriber<? super T> subscriber) { source.subscribe(new ObserveOnSubscriber<>(subscriber, executor)); } SingleObserveOn(Single<T> source, Executor executor); }
SingleObserveOn extends CompletionSingle<T> { @Override public void subscribe(Flow.Subscriber<? super T> subscriber) { source.subscribe(new ObserveOnSubscriber<>(subscriber, executor)); } SingleObserveOn(Single<T> source, Executor executor); @Override void subscribe(Flow.Subscriber<? super T> subscriber); }
SingleObserveOn extends CompletionSingle<T> { @Override public void subscribe(Flow.Subscriber<? super T> subscriber) { source.subscribe(new ObserveOnSubscriber<>(subscriber, executor)); } SingleObserveOn(Single<T> source, Executor executor); @Override void subscribe(Flow.Subscriber<? super T> subscriber);  }