Interface PublisherLastStep
-
- All Known Subinterfaces:
PublisherFirstStep<T>
,PublisherStep<T>
public interface PublisherLastStep
Provides the ability to express expectations for the terminal signals (e.g.onComplete
oronError
) of aPublisherSource.Subscriber
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StepVerifier
expectComplete()
Declare an expectation thatPublisherSource.Subscriber.onComplete()
onComplete} will be the next signal.StepVerifier
expectError()
Declare an expectation thatonError
will be the next signal.StepVerifier
expectError(java.lang.Class<? extends java.lang.Throwable> errorClass)
Declare an expectation thatonError
will be the next signal and it will be of typeerrorClass
.StepVerifier
expectErrorConsumed(java.util.function.Consumer<java.lang.Throwable> errorConsumer)
Declare an expectation thatonError
will be the next signal and evaluate it witherrorConsumer
.StepVerifier
expectErrorMatches(java.util.function.Predicate<java.lang.Throwable> errorPredicate)
Declare an expectation thatonError
will be the next signal and evaluate it witherrorPredicate
.StepVerifier
thenCancel()
Manually invokeCancellable.cancel()
on thePublisherSource.Subscription
fromPublisherSource.Subscriber.onSubscribe(Subscription)
.
-
-
-
Method Detail
-
expectError
StepVerifier expectError()
Declare an expectation thatonError
will be the next signal.- Returns:
- An object which allows to verify all expectations.
-
expectErrorMatches
StepVerifier expectErrorMatches(java.util.function.Predicate<java.lang.Throwable> errorPredicate)
Declare an expectation thatonError
will be the next signal and evaluate it witherrorPredicate
.- Parameters:
errorPredicate
- Will be invoked whenonError
is called and will raise aAssertionError
if the predicate returnsfalse
.- Returns:
- An object which allows to verify all expectations.
-
expectError
StepVerifier expectError(java.lang.Class<? extends java.lang.Throwable> errorClass)
Declare an expectation thatonError
will be the next signal and it will be of typeerrorClass
.- Parameters:
errorClass
- The type of error which is expected.- Returns:
- An object which allows to verify all expectations.
-
expectErrorConsumed
StepVerifier expectErrorConsumed(java.util.function.Consumer<java.lang.Throwable> errorConsumer)
Declare an expectation thatonError
will be the next signal and evaluate it witherrorConsumer
.- Parameters:
errorConsumer
- Will be invoked whenonError
is called.- Returns:
- An object which allows to verify all expectations.
-
expectComplete
StepVerifier expectComplete()
Declare an expectation thatPublisherSource.Subscriber.onComplete()
onComplete} will be the next signal.- Returns:
- An object which allows to verify all expectations.
-
thenCancel
StepVerifier thenCancel()
Manually invokeCancellable.cancel()
on thePublisherSource.Subscription
fromPublisherSource.Subscriber.onSubscribe(Subscription)
.- Returns:
- An object which allows to verify all expectations.
-
-