Package org.reactivestreams.tck.flow
Class FlowSubscriberBlackboxVerification<T>
- java.lang.Object
-
- org.reactivestreams.tck.WithHelperPublisher<T>
-
- org.reactivestreams.tck.SubscriberBlackboxVerification<T>
-
- org.reactivestreams.tck.flow.FlowSubscriberBlackboxVerification<T>
-
- All Implemented Interfaces:
org.reactivestreams.tck.flow.support.SubscriberBlackboxVerificationRules
public abstract class FlowSubscriberBlackboxVerification<T> extends org.reactivestreams.tck.SubscriberBlackboxVerification<T> implements org.reactivestreams.tck.flow.support.SubscriberBlackboxVerificationRules
Provides tests for verifyingFlow.SubscriberandFlow.Subscriptionspecification rules, without any modifications to the tested implementation (also known as "Black Box" testing). This verification is NOT able to check many of the rules of the spec, and if you want more verification of your implementation you'll have to implementorg.reactivestreams.tck.SubscriberWhiteboxVerificationinstead.- See Also:
Flow.Subscriber,Flow.Subscription
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedFlowSubscriberBlackboxVerification(org.reactivestreams.tck.TestEnvironment env)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.util.concurrent.Flow.Subscriber<T>createFlowSubscriber()This is the main method you must implement in your test incarnation.org.reactivestreams.Subscriber<T>createSubscriber()voidtriggerFlowRequest(java.util.concurrent.Flow.Subscriber<? super T> subscriber)Override this method if theFlow.Subscriberimplementation you are verifying needs an external signal before it signals demand to its Publisher.voidtriggerRequest(org.reactivestreams.Subscriber<? super T> subscriber)-
Methods inherited from class org.reactivestreams.tck.SubscriberBlackboxVerification
blackboxSubscriberTest, blackboxSubscriberWithoutSetupTest, notVerified, publisherExecutorService, required_spec201_blackbox_mustSignalDemandViaSubscriptionRequest, required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete, required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnError, required_spec205_blackbox_mustCallSubscriptionCancelIfItAlreadyHasAnSubscriptionAndReceivesAnotherOnSubscribeSignal, required_spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithoutPrecedingRequestCall, required_spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithPrecedingRequestCall, required_spec210_blackbox_mustBePreparedToReceiveAnOnErrorSignalWithoutPrecedingRequestCall, required_spec210_blackbox_mustBePreparedToReceiveAnOnErrorSignalWithPrecedingRequestCall, required_spec213_blackbox_onError_mustThrowNullPointerExceptionWhenParametersAreNull, required_spec213_blackbox_onNext_mustThrowNullPointerExceptionWhenParametersAreNull, required_spec213_blackbox_onSubscribe_mustThrowNullPointerExceptionWhenParametersAreNull, setUp, shutdownPublisherExecutorService, startPublisherExecutorService, untested_spec202_blackbox_shouldAsynchronouslyDispatch, untested_spec204_blackbox_mustConsiderTheSubscriptionAsCancelledInAfterRecievingOnCompleteOrOnError, untested_spec206_blackbox_mustCallSubscriptionCancelIfItIsNoLongerValid, untested_spec207_blackbox_mustEnsureAllCallsOnItsSubscriptionTakePlaceFromTheSameThreadOrTakeCareOfSynchronization, untested_spec208_blackbox_mustBePreparedToReceiveOnNextSignalsAfterHavingCalledSubscriptionCancel, untested_spec211_blackbox_mustMakeSureThatAllCallsOnItsMethodsHappenBeforeTheProcessingOfTheRespectiveEvents, untested_spec212_blackbox_mustNotCallOnSubscribeMoreThanOnceBasedOnObjectEquality, untested_spec213_blackbox_failingOnSignalInvocation, untested_spec301_blackbox_mustNotBeCalledOutsideSubscriberContext, untested_spec308_blackbox_requestMustRegisterGivenNumberElementsToBeProduced, untested_spec310_blackbox_requestMaySynchronouslyCallOnNextOnSubscriber, untested_spec311_blackbox_requestMaySynchronouslyCallOnCompleteOrOnError, untested_spec314_blackbox_cancelMayCauseThePublisherToShutdownIfNoOtherSubscriptionExists, untested_spec315_blackbox_cancelMustNotThrowExceptionAndMustSignalOnError, untested_spec316_blackbox_requestMustNotThrowExceptionAndMustOnErrorTheSubscriber
-
Methods inherited from class org.reactivestreams.tck.WithHelperPublisher
createElement, createHelperPublisher
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.reactivestreams.tck.flow.support.SubscriberBlackboxVerificationRules
required_spec201_blackbox_mustSignalDemandViaSubscriptionRequest, required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete, required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnError, required_spec205_blackbox_mustCallSubscriptionCancelIfItAlreadyHasAnSubscriptionAndReceivesAnotherOnSubscribeSignal, required_spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithoutPrecedingRequestCall, required_spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithPrecedingRequestCall, required_spec210_blackbox_mustBePreparedToReceiveAnOnErrorSignalWithoutPrecedingRequestCall, required_spec210_blackbox_mustBePreparedToReceiveAnOnErrorSignalWithPrecedingRequestCall, required_spec213_blackbox_onError_mustThrowNullPointerExceptionWhenParametersAreNull, required_spec213_blackbox_onNext_mustThrowNullPointerExceptionWhenParametersAreNull, required_spec213_blackbox_onSubscribe_mustThrowNullPointerExceptionWhenParametersAreNull, untested_spec202_blackbox_shouldAsynchronouslyDispatch, untested_spec204_blackbox_mustConsiderTheSubscriptionAsCancelledInAfterRecievingOnCompleteOrOnError, untested_spec206_blackbox_mustCallSubscriptionCancelIfItIsNoLongerValid, untested_spec207_blackbox_mustEnsureAllCallsOnItsSubscriptionTakePlaceFromTheSameThreadOrTakeCareOfSynchronization, untested_spec208_blackbox_mustBePreparedToReceiveOnNextSignalsAfterHavingCalledSubscriptionCancel, untested_spec211_blackbox_mustMakeSureThatAllCallsOnItsMethodsHappenBeforeTheProcessingOfTheRespectiveEvents, untested_spec212_blackbox_mustNotCallOnSubscribeMoreThanOnceBasedOnObjectEquality, untested_spec213_blackbox_failingOnSignalInvocation, untested_spec301_blackbox_mustNotBeCalledOutsideSubscriberContext, untested_spec308_blackbox_requestMustRegisterGivenNumberElementsToBeProduced, untested_spec310_blackbox_requestMaySynchronouslyCallOnNextOnSubscriber, untested_spec311_blackbox_requestMaySynchronouslyCallOnCompleteOrOnError, untested_spec314_blackbox_cancelMayCauseThePublisherToShutdownIfNoOtherSubscriptionExists, untested_spec315_blackbox_cancelMustNotThrowExceptionAndMustSignalOnError, untested_spec316_blackbox_requestMustNotThrowExceptionAndMustOnErrorTheSubscriber
-
-
-
-
Constructor Detail
-
FlowSubscriberBlackboxVerification
protected FlowSubscriberBlackboxVerification(org.reactivestreams.tck.TestEnvironment env)
-
-
Method Detail
-
triggerRequest
public final void triggerRequest(org.reactivestreams.Subscriber<? super T> subscriber)
- Overrides:
triggerRequestin classorg.reactivestreams.tck.SubscriberBlackboxVerification<T>
-
triggerFlowRequest
public void triggerFlowRequest(java.util.concurrent.Flow.Subscriber<? super T> subscriber)
Override this method if theFlow.Subscriberimplementation you are verifying needs an external signal before it signals demand to its Publisher. By default this method does nothing.
-
createSubscriber
public final org.reactivestreams.Subscriber<T> createSubscriber()
- Specified by:
createSubscriberin classorg.reactivestreams.tck.SubscriberBlackboxVerification<T>
-
createFlowSubscriber
public abstract java.util.concurrent.Flow.Subscriber<T> createFlowSubscriber()
This is the main method you must implement in your test incarnation. It must create a newFlow.Subscriberinstance to be subjected to the testing logic.
-
-