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 java.lang.Object implements SubscriberWhiteboxVerification.SubscriberProbe<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected TestEnvironment.Receptacle<T>
elements
protected TestEnvironment
env
protected TestEnvironment.Promise<java.lang.Throwable>
error
protected TestEnvironment.Promise<org.reactivestreams.Subscriber<? super T>>
subscriber
-
Constructor Summary
Constructors Constructor Description BlackboxProbe(TestEnvironment env, TestEnvironment.Promise<org.reactivestreams.Subscriber<? super T>> subscriber)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
expectCompletion()
void
expectCompletion(long timeoutMillis)
void
expectCompletion(long timeoutMillis, java.lang.String msg)
<E extends java.lang.Throwable>
EexpectError(java.lang.Class<E> expected)
<E extends java.lang.Throwable>
EexpectError(java.lang.Class<E> expected, long timeoutMillis)
void
expectError(java.lang.Throwable expected)
void
expectError(java.lang.Throwable expected, long timeoutMillis)
<E extends java.lang.Throwable>
voidexpectErrorWithMessage(java.lang.Class<E> expected, java.lang.String requiredMessagePart)
T
expectNext()
void
expectNext(T expected)
void
expectNext(T expected, long timeoutMillis)
void
expectNone()
void
expectNone(long withinMillis)
void
registerOnComplete()
Must be called by the test subscriber when it has received an `onComplete` event.void
registerOnError(java.lang.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.org.reactivestreams.Subscriber<? super T>
sub()
-
-
-
Field Detail
-
env
protected final TestEnvironment env
-
subscriber
protected final TestEnvironment.Promise<org.reactivestreams.Subscriber<? super T>> subscriber
-
elements
protected final TestEnvironment.Receptacle<T> elements
-
error
protected final TestEnvironment.Promise<java.lang.Throwable> error
-
-
Constructor Detail
-
BlackboxProbe
public BlackboxProbe(TestEnvironment env, TestEnvironment.Promise<org.reactivestreams.Subscriber<? super T>> subscriber)
-
-
Method Detail
-
registerOnNext
public void registerOnNext(T element)
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
public void registerOnError(java.lang.Throwable cause)
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
public T expectNext() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectNext
public void expectNext(T expected) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectNext
public void expectNext(T expected, long timeoutMillis) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectCompletion
public void expectCompletion() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectCompletion
public void expectCompletion(long timeoutMillis) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectCompletion
public void expectCompletion(long timeoutMillis, java.lang.String msg) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectErrorWithMessage
public <E extends java.lang.Throwable> void expectErrorWithMessage(java.lang.Class<E> expected, java.lang.String requiredMessagePart) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectError
public <E extends java.lang.Throwable> E expectError(java.lang.Class<E> expected) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectError
public <E extends java.lang.Throwable> E expectError(java.lang.Class<E> expected, long timeoutMillis) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectError
public void expectError(java.lang.Throwable expected) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectError
public void expectError(java.lang.Throwable expected, long timeoutMillis) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectNone
public void expectNone() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectNone
public void expectNone(long withinMillis) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
-