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:
SubscriberBlackboxVerificationRules
public abstract class FlowSubscriberBlackboxVerification<T> extends SubscriberBlackboxVerification<T> implements 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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.reactivestreams.tck.SubscriberBlackboxVerification
SubscriberBlackboxVerification.BlackboxTestStage
-
-
Field Summary
-
Fields inherited from class org.reactivestreams.tck.SubscriberBlackboxVerification
env
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedFlowSubscriberBlackboxVerification(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.Subscriber<T>createSubscriber()This is the main method you must implement in your test incarnation.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(Subscriber<? super T> subscriber)Override this method if the Subscriber implementation you are verifying needs an external signal before it signals demand to its Publisher.-
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(TestEnvironment env)
-
-
Method Detail
-
triggerRequest
public final void triggerRequest(Subscriber<? super T> subscriber)
Description copied from class:SubscriberBlackboxVerificationOverride this method if the Subscriber implementation you are verifying needs an external signal before it signals demand to its Publisher. By default this method does nothing.- Overrides:
triggerRequestin classSubscriberBlackboxVerification<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 Subscriber<T> createSubscriber()
Description copied from class:SubscriberBlackboxVerificationThis is the main method you must implement in your test incarnation. It must create a newSubscriberinstance to be subjected to the testing logic.- Specified by:
createSubscriberin classSubscriberBlackboxVerification<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.
-
-