@Test public void error() { TestSubscriber<Integer> ts = new TestSubscriber<>(); Multi.<Integer>error(new IOException()) .takeWhile(v -> true) .subscribe(ts); assertThat(ts.getItems().isEmpty(), is(true)); assertThat(ts.getLastError(), instanceOf(IOException.class)); assertThat(ts.isComplete(), is(false)); }
@Override public void subscribe(Flow.Subscriber<? super T> subscriber) { source.subscribe(new TakeWhileSubscriber<>(subscriber, predicate)); }
MultiTakeWhilePublisher implements Multi<T> { @Override public void subscribe(Flow.Subscriber<? super T> subscriber) { source.subscribe(new TakeWhileSubscriber<>(subscriber, predicate)); } }
MultiTakeWhilePublisher implements Multi<T> { @Override public void subscribe(Flow.Subscriber<? super T> subscriber) { source.subscribe(new TakeWhileSubscriber<>(subscriber, predicate)); } MultiTakeWhilePublisher(Multi<T> source, Predicate<? super T> predicate); }
MultiTakeWhilePublisher implements Multi<T> { @Override public void subscribe(Flow.Subscriber<? super T> subscriber) { source.subscribe(new TakeWhileSubscriber<>(subscriber, predicate)); } MultiTakeWhilePublisher(Multi<T> source, Predicate<? super T> predicate); @Override void subscribe(Flow.Subscriber<? super T> subscriber); }
MultiTakeWhilePublisher implements Multi<T> { @Override public void subscribe(Flow.Subscriber<? super T> subscriber) { source.subscribe(new TakeWhileSubscriber<>(subscriber, predicate)); } MultiTakeWhilePublisher(Multi<T> source, Predicate<? super T> predicate); @Override void subscribe(Flow.Subscriber<? super T> subscriber);  }