001/************************************************************************
002 * Licensed under Public Domain (CC0)                                    *
003 *                                                                       *
004 * To the extent possible under law, the person who associated CC0 with  *
005 * this code has waived all copyright and related or neighboring         *
006 * rights to this code.                                                  *
007 *                                                                       *
008 * You should have received a copy of the CC0 legalcode along with this  *
009 * work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.*
010 ************************************************************************/
011
012package org.reactivestreams.tck.flow.support;
013
014/**
015 * Internal TCK use only.
016 * Add / Remove tests for PublisherVerificaSubscriberWhiteboxVerification here to make sure that they arre added/removed in the other places.
017 */
018public interface SubscriberWhiteboxVerificationRules {
019  void required_exerciseWhiteboxHappyPath() throws Throwable;
020  void required_spec201_mustSignalDemandViaSubscriptionRequest() throws Throwable;
021  void untested_spec202_shouldAsynchronouslyDispatch() throws Exception;
022  void required_spec203_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete() throws Throwable;
023  void required_spec203_mustNotCallMethodsOnSubscriptionOrPublisherInOnError() throws Throwable;
024  void untested_spec204_mustConsiderTheSubscriptionAsCancelledInAfterRecievingOnCompleteOrOnError() throws Exception;
025  void required_spec205_mustCallSubscriptionCancelIfItAlreadyHasAnSubscriptionAndReceivesAnotherOnSubscribeSignal() throws Throwable;
026  void untested_spec206_mustCallSubscriptionCancelIfItIsNoLongerValid() throws Exception;
027  void untested_spec207_mustEnsureAllCallsOnItsSubscriptionTakePlaceFromTheSameThreadOrTakeCareOfSynchronization() throws Exception;
028  void required_spec208_mustBePreparedToReceiveOnNextSignalsAfterHavingCalledSubscriptionCancel() throws Throwable;
029  void required_spec209_mustBePreparedToReceiveAnOnCompleteSignalWithPrecedingRequestCall() throws Throwable;
030  void required_spec209_mustBePreparedToReceiveAnOnCompleteSignalWithoutPrecedingRequestCall() throws Throwable;
031  void required_spec210_mustBePreparedToReceiveAnOnErrorSignalWithPrecedingRequestCall() throws Throwable;
032  void required_spec210_mustBePreparedToReceiveAnOnErrorSignalWithoutPrecedingRequestCall() throws Throwable;
033  void untested_spec211_mustMakeSureThatAllCallsOnItsMethodsHappenBeforeTheProcessingOfTheRespectiveEvents() throws Exception;
034  void untested_spec212_mustNotCallOnSubscribeMoreThanOnceBasedOnObjectEquality_specViolation() throws Throwable;
035  void untested_spec213_failingOnSignalInvocation() throws Exception;
036  void required_spec213_onSubscribe_mustThrowNullPointerExceptionWhenParametersAreNull() throws Throwable;
037  void required_spec213_onNext_mustThrowNullPointerExceptionWhenParametersAreNull() throws Throwable;
038  void required_spec213_onError_mustThrowNullPointerExceptionWhenParametersAreNull() throws Throwable;
039  void untested_spec301_mustNotBeCalledOutsideSubscriberContext() throws Exception;
040  void required_spec308_requestMustRegisterGivenNumberElementsToBeProduced() throws Throwable;
041  void untested_spec310_requestMaySynchronouslyCallOnNextOnSubscriber() throws Exception;
042  void untested_spec311_requestMaySynchronouslyCallOnCompleteOrOnError() throws Exception;
043  void untested_spec314_cancelMayCauseThePublisherToShutdownIfNoOtherSubscriptionExists() throws Exception;
044  void untested_spec315_cancelMustNotThrowExceptionAndMustSignalOnError() throws Exception;
045  void untested_spec316_requestMustNotThrowExceptionAndMustOnErrorTheSubscriber() throws Exception;
046}