Package org.reactivestreams.tck
Class SubscriberWhiteboxVerification.BlackboxProbe<T>
java.lang.Object
org.reactivestreams.tck.SubscriberWhiteboxVerification.BlackboxProbe<T>
- All Implemented Interfaces:
SubscriberWhiteboxVerification.SubscriberProbe<T>
- Direct Known Subclasses:
SubscriberWhiteboxVerification.BlackboxSubscriberProxy
,SubscriberWhiteboxVerification.WhiteboxSubscriberProbe
- Enclosing class:
SubscriberWhiteboxVerification<T>
public static class SubscriberWhiteboxVerification.BlackboxProbe<T>
extends Object
implements SubscriberWhiteboxVerification.SubscriberProbe<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final TestEnvironment.Receptacle
<T> protected final TestEnvironment
protected final TestEnvironment.Promise
<Throwable> protected final TestEnvironment.Promise
<Subscriber<? super T>> -
Constructor Summary
ConstructorsConstructorDescriptionBlackboxProbe
(TestEnvironment env, TestEnvironment.Promise<Subscriber<? super T>> subscriber) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
expectCompletion
(long timeoutMillis) void
expectCompletion
(long timeoutMillis, String msg) <E extends Throwable>
EexpectError
(Class<E> expected) <E extends Throwable>
EexpectError
(Class<E> expected, long timeoutMillis) void
expectError
(Throwable expected) void
expectError
(Throwable expected, long timeoutMillis) <E extends Throwable>
voidexpectErrorWithMessage
(Class<E> expected, String requiredMessagePart) void
expectNext
(T expected) void
expectNext
(T expected, long timeoutMillis) void
void
expectNone
(long withinMillis) void
Must be called by the test subscriber when it has received an `onComplete` event.void
registerOnError
(Throwable cause) Must be called by the test subscriber when it has received an `onError` event.void
registerOnNext
(T element) Must be called by the test subscriber when it has received an`onNext` event.Subscriber
<? super T> sub()
-
Field Details
-
env
-
subscriber
-
elements
-
error
-
-
Constructor Details
-
BlackboxProbe
public BlackboxProbe(TestEnvironment env, TestEnvironment.Promise<Subscriber<? super T>> subscriber)
-
-
Method Details
-
registerOnNext
Description copied from interface:SubscriberWhiteboxVerification.SubscriberProbe
Must be called by the test subscriber when it has received an`onNext` event.- Specified by:
registerOnNext
in interfaceSubscriberWhiteboxVerification.SubscriberProbe<T>
-
registerOnComplete
public void registerOnComplete()Description copied from interface:SubscriberWhiteboxVerification.SubscriberProbe
Must be called by the test subscriber when it has received an `onComplete` event.- Specified by:
registerOnComplete
in interfaceSubscriberWhiteboxVerification.SubscriberProbe<T>
-
registerOnError
Description copied from interface:SubscriberWhiteboxVerification.SubscriberProbe
Must be called by the test subscriber when it has received an `onError` event.- Specified by:
registerOnError
in interfaceSubscriberWhiteboxVerification.SubscriberProbe<T>
-
expectNext
- Throws:
InterruptedException
-
expectNext
- Throws:
InterruptedException
-
expectNext
- Throws:
InterruptedException
-
sub
-
expectCompletion
- Throws:
InterruptedException
-
expectCompletion
- Throws:
InterruptedException
-
expectCompletion
- Throws:
InterruptedException
-
expectErrorWithMessage
public <E extends Throwable> void expectErrorWithMessage(Class<E> expected, String requiredMessagePart) throws InterruptedException - Throws:
InterruptedException
-
expectError
- Throws:
InterruptedException
-
expectError
public <E extends Throwable> E expectError(Class<E> expected, long timeoutMillis) throws InterruptedException - Throws:
InterruptedException
-
expectError
- Throws:
InterruptedException
-
expectError
- Throws:
InterruptedException
-
expectNone
- Throws:
InterruptedException
-
expectNone
- Throws:
InterruptedException
-