public static class SubscriberWhiteboxVerification.BlackboxSubscriberProxy<T> extends SubscriberWhiteboxVerification.BlackboxProbe<T> implements Subscriber<T>
Subscriber decorator and should be used in pub.subscriber(...) calls,
in order to allow intercepting calls on the underlying Subscriber.
This delegation allows the proxy to implement SubscriberWhiteboxVerification.BlackboxProbe assertions.elements, env, error, subscriber| Constructor and Description |
|---|
BlackboxSubscriberProxy(TestEnvironment env,
Subscriber<T> subscriber) |
| Modifier and Type | Method and Description |
|---|---|
void |
onComplete()
Successful terminal state.
|
void |
onError(java.lang.Throwable cause)
Failed terminal state.
|
void |
onNext(T t)
Data notification sent by the
Publisher in response to requests to Subscription.request(long). |
void |
onSubscribe(Subscription s)
Invoked after calling
Publisher.subscribe(Subscriber). |
expectCompletion, expectCompletion, expectCompletion, expectError, expectError, expectError, expectError, expectErrorWithMessage, expectNext, expectNext, expectNext, expectNone, expectNone, registerOnComplete, registerOnError, registerOnNext, subpublic BlackboxSubscriberProxy(TestEnvironment env, Subscriber<T> subscriber)
public void onSubscribe(Subscription s)
SubscriberPublisher.subscribe(Subscriber).
No data will start flowing until Subscription.request(long) is invoked.
It is the responsibility of this Subscriber instance to call Subscription.request(long) whenever more data is wanted.
The Publisher will send notifications only in response to Subscription.request(long).
onSubscribe in interface Subscriber<T>s - Subscription that allows requesting data via Subscription.request(long)public void onNext(T t)
SubscriberPublisher in response to requests to Subscription.request(long).onNext in interface Subscriber<T>t - the element signaledpublic void onError(java.lang.Throwable cause)
Subscriber
No further events will be sent even if Subscription.request(long) is invoked again.
onError in interface Subscriber<T>cause - the throwable signaledpublic void onComplete()
Subscriber
No further events will be sent even if Subscription.request(long) is invoked again.
onComplete in interface Subscriber<T>