public abstract class SubscriberBlackboxVerification<T> extends WithHelperPublisher<T> implements SubscriberBlackboxVerificationRules
Subscriber
and Subscription
specification 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 implement org.reactivestreams.tck.SubscriberWhiteboxVerification
instead.Subscriber
,
Subscription
Modifier and Type | Class and Description |
---|---|
class |
SubscriberBlackboxVerification.BlackboxTestStage |
Modifier and Type | Field and Description |
---|---|
protected TestEnvironment |
env |
Modifier | Constructor and Description |
---|---|
protected |
SubscriberBlackboxVerification(TestEnvironment env) |
createElement, createHelperPublisher
protected final TestEnvironment env
protected SubscriberBlackboxVerification(TestEnvironment env)
public abstract org.reactivestreams.Subscriber<T> createSubscriber()
Subscriber
instance to be subjected to the testing logic.public void triggerRequest(org.reactivestreams.Subscriber<? super T> subscriber)
public void startPublisherExecutorService()
public void shutdownPublisherExecutorService()
public java.util.concurrent.ExecutorService publisherExecutorService()
WithHelperPublisher
Publisher
publisherExecutorService
in class WithHelperPublisher<T>
public void setUp() throws java.lang.Exception
java.lang.Exception
public void required_spec201_blackbox_mustSignalDemandViaSubscriptionRequest() throws java.lang.Throwable
required_spec201_blackbox_mustSignalDemandViaSubscriptionRequest
in interface SubscriberBlackboxVerificationRules
java.lang.Throwable
public void untested_spec202_blackbox_shouldAsynchronouslyDispatch() throws java.lang.Exception
untested_spec202_blackbox_shouldAsynchronouslyDispatch
in interface SubscriberBlackboxVerificationRules
java.lang.Exception
public void required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete() throws java.lang.Throwable
required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete
in interface SubscriberBlackboxVerificationRules
java.lang.Throwable
public void required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnError() throws java.lang.Throwable
required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnError
in interface SubscriberBlackboxVerificationRules
java.lang.Throwable
public void untested_spec204_blackbox_mustConsiderTheSubscriptionAsCancelledInAfterRecievingOnCompleteOrOnError() throws java.lang.Exception
untested_spec204_blackbox_mustConsiderTheSubscriptionAsCancelledInAfterRecievingOnCompleteOrOnError
in interface SubscriberBlackboxVerificationRules
java.lang.Exception
public void required_spec205_blackbox_mustCallSubscriptionCancelIfItAlreadyHasAnSubscriptionAndReceivesAnotherOnSubscribeSignal() throws java.lang.Exception
required_spec205_blackbox_mustCallSubscriptionCancelIfItAlreadyHasAnSubscriptionAndReceivesAnotherOnSubscribeSignal
in interface SubscriberBlackboxVerificationRules
java.lang.Exception
public void untested_spec206_blackbox_mustCallSubscriptionCancelIfItIsNoLongerValid() throws java.lang.Exception
untested_spec206_blackbox_mustCallSubscriptionCancelIfItIsNoLongerValid
in interface SubscriberBlackboxVerificationRules
java.lang.Exception
public void untested_spec207_blackbox_mustEnsureAllCallsOnItsSubscriptionTakePlaceFromTheSameThreadOrTakeCareOfSynchronization() throws java.lang.Exception
untested_spec207_blackbox_mustEnsureAllCallsOnItsSubscriptionTakePlaceFromTheSameThreadOrTakeCareOfSynchronization
in interface SubscriberBlackboxVerificationRules
java.lang.Exception
public void untested_spec208_blackbox_mustBePreparedToReceiveOnNextSignalsAfterHavingCalledSubscriptionCancel() throws java.lang.Throwable
untested_spec208_blackbox_mustBePreparedToReceiveOnNextSignalsAfterHavingCalledSubscriptionCancel
in interface SubscriberBlackboxVerificationRules
java.lang.Throwable
public void required_spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithPrecedingRequestCall() throws java.lang.Throwable
required_spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithPrecedingRequestCall
in interface SubscriberBlackboxVerificationRules
java.lang.Throwable
public void required_spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithoutPrecedingRequestCall() throws java.lang.Throwable
required_spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithoutPrecedingRequestCall
in interface SubscriberBlackboxVerificationRules
java.lang.Throwable
public void required_spec210_blackbox_mustBePreparedToReceiveAnOnErrorSignalWithPrecedingRequestCall() throws java.lang.Throwable
required_spec210_blackbox_mustBePreparedToReceiveAnOnErrorSignalWithPrecedingRequestCall
in interface SubscriberBlackboxVerificationRules
java.lang.Throwable
public void untested_spec211_blackbox_mustMakeSureThatAllCallsOnItsMethodsHappenBeforeTheProcessingOfTheRespectiveEvents() throws java.lang.Exception
untested_spec211_blackbox_mustMakeSureThatAllCallsOnItsMethodsHappenBeforeTheProcessingOfTheRespectiveEvents
in interface SubscriberBlackboxVerificationRules
java.lang.Exception
public void untested_spec212_blackbox_mustNotCallOnSubscribeMoreThanOnceBasedOnObjectEquality() throws java.lang.Throwable
untested_spec212_blackbox_mustNotCallOnSubscribeMoreThanOnceBasedOnObjectEquality
in interface SubscriberBlackboxVerificationRules
java.lang.Throwable
public void untested_spec213_blackbox_failingOnSignalInvocation() throws java.lang.Exception
untested_spec213_blackbox_failingOnSignalInvocation
in interface SubscriberBlackboxVerificationRules
java.lang.Exception
public void required_spec213_blackbox_onSubscribe_mustThrowNullPointerExceptionWhenParametersAreNull() throws java.lang.Throwable
required_spec213_blackbox_onSubscribe_mustThrowNullPointerExceptionWhenParametersAreNull
in interface SubscriberBlackboxVerificationRules
java.lang.Throwable
public void required_spec213_blackbox_onNext_mustThrowNullPointerExceptionWhenParametersAreNull() throws java.lang.Throwable
required_spec213_blackbox_onNext_mustThrowNullPointerExceptionWhenParametersAreNull
in interface SubscriberBlackboxVerificationRules
java.lang.Throwable
public void required_spec213_blackbox_onError_mustThrowNullPointerExceptionWhenParametersAreNull() throws java.lang.Throwable
required_spec213_blackbox_onError_mustThrowNullPointerExceptionWhenParametersAreNull
in interface SubscriberBlackboxVerificationRules
java.lang.Throwable
public void untested_spec301_blackbox_mustNotBeCalledOutsideSubscriberContext() throws java.lang.Exception
untested_spec301_blackbox_mustNotBeCalledOutsideSubscriberContext
in interface SubscriberBlackboxVerificationRules
java.lang.Exception
public void untested_spec308_blackbox_requestMustRegisterGivenNumberElementsToBeProduced() throws java.lang.Throwable
untested_spec308_blackbox_requestMustRegisterGivenNumberElementsToBeProduced
in interface SubscriberBlackboxVerificationRules
java.lang.Throwable
public void untested_spec310_blackbox_requestMaySynchronouslyCallOnNextOnSubscriber() throws java.lang.Exception
untested_spec310_blackbox_requestMaySynchronouslyCallOnNextOnSubscriber
in interface SubscriberBlackboxVerificationRules
java.lang.Exception
public void untested_spec311_blackbox_requestMaySynchronouslyCallOnCompleteOrOnError() throws java.lang.Exception
untested_spec311_blackbox_requestMaySynchronouslyCallOnCompleteOrOnError
in interface SubscriberBlackboxVerificationRules
java.lang.Exception
public void untested_spec314_blackbox_cancelMayCauseThePublisherToShutdownIfNoOtherSubscriptionExists() throws java.lang.Exception
untested_spec314_blackbox_cancelMayCauseThePublisherToShutdownIfNoOtherSubscriptionExists
in interface SubscriberBlackboxVerificationRules
java.lang.Exception
public void untested_spec315_blackbox_cancelMustNotThrowExceptionAndMustSignalOnError() throws java.lang.Exception
untested_spec315_blackbox_cancelMustNotThrowExceptionAndMustSignalOnError
in interface SubscriberBlackboxVerificationRules
java.lang.Exception
public void untested_spec316_blackbox_requestMustNotThrowExceptionAndMustOnErrorTheSubscriber() throws java.lang.Exception
untested_spec316_blackbox_requestMustNotThrowExceptionAndMustOnErrorTheSubscriber
in interface SubscriberBlackboxVerificationRules
java.lang.Exception
public void blackboxSubscriberTest(org.reactivestreams.tck.SubscriberBlackboxVerification.BlackboxTestStageTestRun body) throws java.lang.Throwable
java.lang.Throwable
public void blackboxSubscriberWithoutSetupTest(org.reactivestreams.tck.SubscriberBlackboxVerification.BlackboxTestStageTestRun body) throws java.lang.Throwable
java.lang.Throwable
public void notVerified()