Package reactor.test
Interface StepVerifier.FirstStep<T>
- Type Parameters:
T- the type of values that the subscriber contains
- All Superinterfaces:
StepVerifier.LastStep,StepVerifier.Step<T>
- Enclosing interface:
- StepVerifier
Define a builder for explicitly expecting an initializing
Subscription as
first signal.
If StepVerifier.FirstStep expectations are not used, the produced
StepVerifier keeps a first expectation that will be checking if
the first signal is a
Subscription.
-
Method Summary
Modifier and TypeMethodDescriptiondefault StepVerifier.FirstStep<T>enableConditionalSupport(@Nullable Predicate<? super T> tryOnNextPredicate) Provide aPredicatethat will turn this StepVerifier's subscribers intoFuseable.ConditionalSubscriberand drive theFuseable.ConditionalSubscriber.tryOnNext(Object)behavior of these subscribers.Expect the sourcePublisherto run with Reactor Fusion flow optimization.expectFusion(int requested) Expect the sourcePublisherto run the requested Reactor Fusion mode from any of these modes :Fuseable.NONE,Fuseable.SYNC,Fuseable.ASYNC,Fuseable.ANY,Fuseable.THREAD_BARRIER.expectFusion(int requested, int expected) Expect the sourcePublisherto run with Reactor Fusion flow optimization.Expect the sourcePublisherto NOT run with Reactor Fusion flow optimization.Expect aSubscription.expectSubscriptionMatches(Predicate<? super Subscription> predicate) Expect aSubscriptionand evaluate with the given predicate.Methods inherited from interface reactor.test.StepVerifier.LastStep
consumeErrorWith, expectComplete, expectError, expectError, expectErrorMatches, expectErrorMessage, expectErrorSatisfies, expectTimeout, thenCancel, verifyComplete, verifyError, verifyError, verifyErrorMatches, verifyErrorMessage, verifyErrorSatisfies, verifyTimeoutMethods inherited from interface reactor.test.StepVerifier.Step
as, assertNext, consumeNextWith, consumeRecordedWith, consumeSubscriptionWith, expectAccessibleContext, expectNext, expectNext, expectNext, expectNext, expectNext, expectNext, expectNext, expectNextCount, expectNextMatches, expectNextSequence, expectNoAccessibleContext, expectNoEvent, expectRecordedMatches, recordWith, then, thenAwait, thenAwait, thenConsumeWhile, thenConsumeWhile, thenRequest
-
Method Details
-
enableConditionalSupport
default StepVerifier.FirstStep<T> enableConditionalSupport(@Nullable Predicate<? super T> tryOnNextPredicate) Provide aPredicatethat will turn this StepVerifier's subscribers intoFuseable.ConditionalSubscriberand drive theFuseable.ConditionalSubscriber.tryOnNext(Object)behavior of these subscribers. Set tonullto deactivate (the default).- Parameters:
tryOnNextPredicate- thePredicateto use for conditional tryOnNext path- Returns:
- the verifier for final
StepVerifier.verify()call
-
expectFusion
StepVerifier.Step<T> expectFusion()Expect the sourcePublisherto run with Reactor Fusion flow optimization. It will be requestingFuseable.ANYfusion mode.- Returns:
- this builder
- See Also:
-
expectFusion
Expect the sourcePublisherto run the requested Reactor Fusion mode from any of these modes :Fuseable.NONE,Fuseable.SYNC,Fuseable.ASYNC,Fuseable.ANY,Fuseable.THREAD_BARRIER.- Parameters:
requested- the requested and expected fusion mode- Returns:
- this builder
- See Also:
-
expectFusion
Expect the sourcePublisherto run with Reactor Fusion flow optimization. Expect the sourcePublisherto run the requested Reactor Fusion mode from any of these modes :Fuseable.NONE,Fuseable.SYNC,Fuseable.ASYNC,Fuseable.ANY,Fuseable.THREAD_BARRIER.- Parameters:
requested- the requested fusion modeexpected- the expected fusion mode- Returns:
- this builder
- See Also:
-
expectNoFusionSupport
StepVerifier.Step<T> expectNoFusionSupport()Expect the sourcePublisherto NOT run with Reactor Fusion flow optimization. It will check if publisher isFuseableor subscription is aFuseable.QueueSubscription.- Returns:
- this builder
- See Also:
-
expectSubscription
StepVerifier.Step<T> expectSubscription()Expect aSubscription. Effectively behave as the default implicitSubscriptionexpectation.- Returns:
- this builder
- See Also:
-
expectSubscriptionMatches
Expect aSubscriptionand evaluate with the given predicate.- Parameters:
predicate- the predicate to test on the receivedSubscription- Returns:
- this builder
- See Also:
-