@Test public void completeFirst() { TestSubscriber<Integer> ts = TestSubscriber.create(0L); TestingDeferredScalarSubscriber ds = new TestingDeferredScalarSubscriber(ts); ds.setupDownstream(); ds.onNext(1); ts.assertNoValues(); ds.onComplete(); ts.assertNoValues(); ts.request(1); ts.assertValues(1); ts.assertNoErrors(); ts.assertComplete(); }
@Override public void onComplete() { if (hasValue) { complete(value); } else { actual.onComplete(); } }
DeferredScalarSubscriber extends DeferredScalarSubscription<R> implements FlowableSubscriber<T> { @Override public void onComplete() { if (hasValue) { complete(value); } else { actual.onComplete(); } } }
DeferredScalarSubscriber extends DeferredScalarSubscription<R> implements FlowableSubscriber<T> { @Override public void onComplete() { if (hasValue) { complete(value); } else { actual.onComplete(); } } DeferredScalarSubscriber(Subscriber<? super R> actual); }
DeferredScalarSubscriber extends DeferredScalarSubscription<R> implements FlowableSubscriber<T> { @Override public void onComplete() { if (hasValue) { complete(value); } else { actual.onComplete(); } } DeferredScalarSubscriber(Subscriber<? super R> actual); @Override void onSubscribe(Subscription s); @Override void onError(Throwable t); @Override void onComplete(); @Override void cancel(); }
DeferredScalarSubscriber extends DeferredScalarSubscription<R> implements FlowableSubscriber<T> { @Override public void onComplete() { if (hasValue) { complete(value); } else { actual.onComplete(); } } DeferredScalarSubscriber(Subscriber<? super R> actual); @Override void onSubscribe(Subscription s); @Override void onError(Throwable t); @Override void onComplete(); @Override void cancel();  }