Package | Description |
---|---|
reactor.test |
Main test components supporting the testing and assertion of publishers.
|
Modifier and Type | Method and Description |
---|---|
StepVerifier.Assertions |
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 |
StepVerifier.Assertions.hasDiscardedElements()
Assert that the tested publisher has discarded at least one element to the
discard hook. |
StepVerifier.Assertions |
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 |
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 |
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 |
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 |
StepVerifier.Assertions.hasDroppedElements()
Assert that the tested publisher has dropped at least one element to the
Hooks.onNextDropped(Consumer) hook. |
StepVerifier.Assertions |
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 |
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 |
StepVerifier.Assertions.hasDroppedErrors()
Assert that the tested publisher has dropped at least one error to the
Hooks.onErrorDropped(Consumer) hook. |
StepVerifier.Assertions |
StepVerifier.Assertions.hasDroppedErrors(int n)
Assert that the tested publisher has dropped exactly n errors to the
Hooks.onErrorDropped(Consumer) hook. |
StepVerifier.Assertions |
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 |
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 |
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 |
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 |
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 |
StepVerifier.Assertions.hasNotDiscardedElements()
Assert that the tested publisher has not discarded any element to the
discard hook. |
StepVerifier.Assertions |
StepVerifier.Assertions.hasNotDroppedElements()
Assert that the tested publisher has not dropped any element to the
Hooks.onNextDropped(Consumer) hook. |
StepVerifier.Assertions |
StepVerifier.Assertions.hasNotDroppedErrors()
Assert that the tested publisher has not dropped any error to the
Hooks.onErrorDropped(Consumer) hook. |
StepVerifier.Assertions |
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 |
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 |
StepVerifier.Assertions.hasOperatorErrors()
Assert that the tested publisher has triggered the
onOperatorError hook
at least once. |
StepVerifier.Assertions |
StepVerifier.Assertions.hasOperatorErrors(int n)
Assert that the tested publisher has triggered the
onOperatorError hook
exactly n times. |
StepVerifier.Assertions |
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 |
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 |
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 |
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 |
StepVerifier.Assertions.tookLessThan(Duration d)
Assert that the whole verification took strictly less than the provided
duration to execute.
|
StepVerifier.Assertions |
StepVerifier.Assertions.tookMoreThan(Duration d)
Assert that the whole verification took strictly more than the provided
duration to execute.
|
StepVerifier.Assertions |
StepVerifier.verifyThenAssertThat()
Verifies the signals received by this subscriber, then exposes
various assertion methods on the final state. |
StepVerifier.Assertions |
StepVerifier.verifyThenAssertThat(Duration duration)
Verifies the signals received by this subscriber, then exposes
various assertion methods on the final state. |