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>elementsprotected TestEnvironmentenvprotected TestEnvironment.Promise<java.lang.Throwable>errorprotected 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 voidexpectCompletion()voidexpectCompletion(long timeoutMillis)voidexpectCompletion(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)voidexpectError(java.lang.Throwable expected)voidexpectError(java.lang.Throwable expected, long timeoutMillis)<E extends java.lang.Throwable>
voidexpectErrorWithMessage(java.lang.Class<E> expected, java.lang.String requiredMessagePart)TexpectNext()voidexpectNext(T expected)voidexpectNext(T expected, long timeoutMillis)voidexpectNone()voidexpectNone(long withinMillis)voidregisterOnComplete()Must be called by the test subscriber when it has received an `onComplete` event.voidregisterOnError(java.lang.Throwable cause)Must be called by the test subscriber when it has received an `onError` event.voidregisterOnNext(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.SubscriberProbeMust be called by the test subscriber when it has received an`onNext` event.- Specified by:
registerOnNextin interfaceSubscriberWhiteboxVerification.SubscriberProbe<T>
-
registerOnComplete
public void registerOnComplete()
Description copied from interface:SubscriberWhiteboxVerification.SubscriberProbeMust be called by the test subscriber when it has received an `onComplete` event.- Specified by:
registerOnCompletein interfaceSubscriberWhiteboxVerification.SubscriberProbe<T>
-
registerOnError
public void registerOnError(java.lang.Throwable cause)
Description copied from interface:SubscriberWhiteboxVerification.SubscriberProbeMust be called by the test subscriber when it has received an `onError` event.- Specified by:
registerOnErrorin 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
-
-