@Test public void singleFromSourceCancel() { Cancellable srcCancellable = mock(Cancellable.class); SingleSource<Integer> source = s -> s.onSubscribe(srcCancellable); fromSource(source).toFuture().cancel(true); verify(srcCancellable).cancel(); }
public static <T> Publisher<T> fromSource(PublisherSource<T> source) { if (source instanceof Publisher) { return uncheckedCast(source); } return new PublisherSourceToPublisher<>(source); }
SourceAdapters { public static <T> Publisher<T> fromSource(PublisherSource<T> source) { if (source instanceof Publisher) { return uncheckedCast(source); } return new PublisherSourceToPublisher<>(source); } }
SourceAdapters { public static <T> Publisher<T> fromSource(PublisherSource<T> source) { if (source instanceof Publisher) { return uncheckedCast(source); } return new PublisherSourceToPublisher<>(source); } private  SourceAdapters(); }
SourceAdapters { public static <T> Publisher<T> fromSource(PublisherSource<T> source) { if (source instanceof Publisher) { return uncheckedCast(source); } return new PublisherSourceToPublisher<>(source); } private  SourceAdapters(); static PublisherSource<T> toSource(Publisher<T> publisher); static SingleSource<T> toSource(Single<T> single); static CompletableSource toSource(Completable completable); static Publisher<T> fromSource(PublisherSource<T> source); static Single<T> fromSource(SingleSource<T> source); static Completable fromSource(CompletableSource source); }
SourceAdapters { public static <T> Publisher<T> fromSource(PublisherSource<T> source) { if (source instanceof Publisher) { return uncheckedCast(source); } return new PublisherSourceToPublisher<>(source); } private  SourceAdapters(); static PublisherSource<T> toSource(Publisher<T> publisher); static SingleSource<T> toSource(Single<T> single); static CompletableSource toSource(Completable completable); static Publisher<T> fromSource(PublisherSource<T> source); static Single<T> fromSource(SingleSource<T> source); static Completable fromSource(CompletableSource source);  }