public static interface StepVerifier.Assertions
Modifier and Type | Method and Description |
---|---|
StepVerifier.Assertions |
hasDiscarded(Object... values)
Assert that the tested publisher has discarded at least all of the provided
elements to the
discard hook, in any order. |
StepVerifier.Assertions |
hasDiscardedElements()
Assert that the tested publisher has discarded at least one element to the
discard hook. |
StepVerifier.Assertions |
hasDiscardedElementsMatching(Predicate<Collection<Object>> matcher)
Assert that the tested publisher has discarded one or more elements to the
discard hook,
and check that the collection of discarded elements matches a predicate. |
StepVerifier.Assertions |
hasDiscardedElementsSatisfying(Consumer<Collection<Object>> consumer)
Assert that the tested publisher has discarded one or more elements to the
discard hook, and assert them as a collection. |
StepVerifier.Assertions |
hasDiscardedExactly(Object... values)
Assert that the tested publisher has discarded all of the provided elements to
the
discard hook,
in any order, and that no other elements were dropped. |
StepVerifier.Assertions |
hasDropped(Object... values)
Assert that the tested publisher has dropped at least all of the provided
elements to the
Hooks.onNextDropped(Consumer) hook, in any order. |
StepVerifier.Assertions |
hasDroppedElements()
Assert that the tested publisher has dropped at least one element to the
Hooks.onNextDropped(Consumer) hook. |
StepVerifier.Assertions |
hasDroppedErrorMatching(Predicate<Throwable> matcher)
Assert that the tested publisher has dropped exactly one error matching the given
predicate to the
Hooks.onErrorDropped(Consumer) hook. |
StepVerifier.Assertions |
hasDroppedErrorOfType(Class<? extends Throwable> clazz)
Assert that the tested publisher has dropped exactly one error of the given type
to the
Hooks.onErrorDropped(Consumer) hook. |
StepVerifier.Assertions |
hasDroppedErrors()
Assert that the tested publisher has dropped at least one error to the
Hooks.onErrorDropped(Consumer) hook. |
StepVerifier.Assertions |
hasDroppedErrors(int n)
Assert that the tested publisher has dropped exactly n errors to the
Hooks.onErrorDropped(Consumer) hook. |
StepVerifier.Assertions |
hasDroppedErrorsMatching(Predicate<Collection<Throwable>> errorsConsumer)
Assert that the tested publisher has dropped one or more errors to the
Hooks.onErrorDropped(Consumer) hook, and check that the collection of
errors matches a predicate. |
StepVerifier.Assertions |
hasDroppedErrorsSatisfying(Consumer<Collection<Throwable>> errorsConsumer)
Assert that the tested publisher has dropped one or more errors to the
Hooks.onErrorDropped(Consumer) hook, and assert them as a collection. |
StepVerifier.Assertions |
hasDroppedErrorWithMessage(String message)
Assert that the tested publisher has dropped exactly one error with the exact provided
message to the
Hooks.onErrorDropped(Consumer) hook. |
StepVerifier.Assertions |
hasDroppedErrorWithMessageContaining(String messagePart)
Assert that the tested publisher has dropped exactly one error with a message containing
the provided string to the
Hooks.onErrorDropped(Consumer) hook. |
StepVerifier.Assertions |
hasDroppedExactly(Object... values)
Assert that the tested publisher has dropped all of the provided elements to
the
Hooks.onNextDropped(Consumer) hook, in any order, and that no
other elements were dropped. |
StepVerifier.Assertions |
hasNotDiscardedElements()
Assert that the tested publisher has not discarded any element to the
discard hook. |
StepVerifier.Assertions |
hasNotDroppedElements()
Assert that the tested publisher has not dropped any element to the
Hooks.onNextDropped(Consumer) hook. |
StepVerifier.Assertions |
hasNotDroppedErrors()
Assert that the tested publisher has not dropped any error to the
Hooks.onErrorDropped(Consumer) hook. |
StepVerifier.Assertions |
hasOperatorErrorMatching(Predicate<Throwable> matcher)
Assert that the tested publisher has triggered the
onOperatorError hook
exactly once and the error matches the given predicate. |
StepVerifier.Assertions |
hasOperatorErrorOfType(Class<? extends Throwable> clazz)
Assert that the tested publisher has triggered the
onOperatorError hook
exactly once and the error is of the given type. |
StepVerifier.Assertions |
hasOperatorErrors()
Assert that the tested publisher has triggered the
onOperatorError hook
at least once. |
StepVerifier.Assertions |
hasOperatorErrors(int n)
Assert that the tested publisher has triggered the
onOperatorError hook
exactly n times. |
StepVerifier.Assertions |
hasOperatorErrorsMatching(Predicate<Collection<Tuple2<Optional<Throwable>,Optional<?>>>> errorsConsumer)
Assert that the tested publisher has triggered the
onOperatorError hook
once or more, and check that the collection of errors and their optionally
associated data matches a predicate. |
StepVerifier.Assertions |
hasOperatorErrorsSatisfying(Consumer<Collection<Tuple2<Optional<Throwable>,Optional<?>>>> errorsConsumer)
Assert that the tested publisher has triggered the
onOperatorError hook
once or more, and assert the errors and optionally associated data as a collection. |
StepVerifier.Assertions |
hasOperatorErrorWithMessage(String message)
Assert that the tested publisher has triggered the
onOperatorError hook
exactly once and the error has the exact provided message. |
StepVerifier.Assertions |
hasOperatorErrorWithMessageContaining(String messagePart)
Assert that the tested publisher has triggered the
onOperatorError hook
exactly once, with the error message containing the provided string. |
StepVerifier.Assertions |
tookLessThan(Duration d)
Assert that the whole verification took strictly less than the provided
duration to execute.
|
StepVerifier.Assertions |
tookMoreThan(Duration d)
Assert that the whole verification took strictly more than the provided
duration to execute.
|
StepVerifier.Assertions hasDroppedElements()
Hooks.onNextDropped(Consumer)
hook.StepVerifier.Assertions hasNotDroppedElements()
Hooks.onNextDropped(Consumer)
hook.StepVerifier.Assertions hasDropped(Object... values)
Hooks.onNextDropped(Consumer)
hook, in any order.StepVerifier.Assertions hasDroppedExactly(Object... values)
Hooks.onNextDropped(Consumer)
hook, in any order, and that no
other elements were dropped.StepVerifier.Assertions hasDiscardedElements()
discard
hook.
Unlike hasDroppedElements()
, the discard hook can be invoked as part
of normal operations, eg. when an element doesn't match a filter.
StepVerifier.Assertions hasNotDiscardedElements()
discard
hook.
Unlike hasDroppedElements()
, the discard hook can be invoked as part
of normal operations, eg. when an element doesn't match a filter.
StepVerifier.Assertions hasDiscarded(Object... values)
discard
hook, in any order.
Unlike hasDroppedElements()
, the discard hook can be invoked as part
of normal operations, eg. when an element doesn't match a filter.
StepVerifier.Assertions hasDiscardedExactly(Object... values)
discard
hook,
in any order, and that no other elements were dropped.
Unlike hasDroppedElements()
, the discard hook can be invoked as part
of normal operations, eg. when an element doesn't match a filter.
StepVerifier.Assertions hasDiscardedElementsMatching(Predicate<Collection<Object>> matcher)
discard
hook,
and check that the collection of discarded elements matches a predicate.StepVerifier.Assertions hasDiscardedElementsSatisfying(Consumer<Collection<Object>> consumer)
discard
hook, and assert them as a collection.StepVerifier.Assertions hasDroppedErrors()
Hooks.onErrorDropped(Consumer)
hook.StepVerifier.Assertions hasNotDroppedErrors()
Hooks.onErrorDropped(Consumer)
hook.StepVerifier.Assertions hasDroppedErrors(int n)
Hooks.onErrorDropped(Consumer)
hook.StepVerifier.Assertions hasDroppedErrorOfType(Class<? extends Throwable> clazz)
Hooks.onErrorDropped(Consumer)
hook.StepVerifier.Assertions hasDroppedErrorMatching(Predicate<Throwable> matcher)
Hooks.onErrorDropped(Consumer)
hook.StepVerifier.Assertions hasDroppedErrorWithMessage(String message)
Hooks.onErrorDropped(Consumer)
hook.StepVerifier.Assertions hasDroppedErrorWithMessageContaining(String messagePart)
Hooks.onErrorDropped(Consumer)
hook.StepVerifier.Assertions hasDroppedErrorsSatisfying(Consumer<Collection<Throwable>> errorsConsumer)
Hooks.onErrorDropped(Consumer)
hook, and assert them as a collection.StepVerifier.Assertions hasDroppedErrorsMatching(Predicate<Collection<Throwable>> errorsConsumer)
Hooks.onErrorDropped(Consumer)
hook, and check that the collection of
errors matches a predicate.StepVerifier.Assertions hasOperatorErrors()
onOperatorError
hook
at least once.StepVerifier.Assertions hasOperatorErrors(int n)
onOperatorError
hook
exactly n times.StepVerifier.Assertions hasOperatorErrorOfType(Class<? extends Throwable> clazz)
onOperatorError
hook
exactly once and the error is of the given type.StepVerifier.Assertions hasOperatorErrorMatching(Predicate<Throwable> matcher)
onOperatorError
hook
exactly once and the error matches the given predicate.StepVerifier.Assertions hasOperatorErrorWithMessage(String message)
onOperatorError
hook
exactly once and the error has the exact provided message.StepVerifier.Assertions hasOperatorErrorWithMessageContaining(String messagePart)
onOperatorError
hook
exactly once, with the error message containing the provided string.StepVerifier.Assertions hasOperatorErrorsSatisfying(Consumer<Collection<Tuple2<Optional<Throwable>,Optional<?>>>> errorsConsumer)
onOperatorError
hook
once or more, and assert the errors and optionally associated data as a collection.StepVerifier.Assertions hasOperatorErrorsMatching(Predicate<Collection<Tuple2<Optional<Throwable>,Optional<?>>>> errorsConsumer)
onOperatorError
hook
once or more, and check that the collection of errors and their optionally
associated data matches a predicate.StepVerifier.Assertions tookLessThan(Duration d)
d
- the expected maximum duration of the verificationStepVerifier.Assertions tookMoreThan(Duration d)
d
- the expected minimum duration of the verification