程序包 | 说明 |
---|---|
reactor.test |
Main test components supporting the testing and assertion of publishers.
|
限定符和类型 | 方法和说明 |
---|---|
StepVerifier.Assertions |
StepVerifier.Assertions.hasDiscarded(java.lang.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(java.util.function.Predicate<java.util.Collection<java.lang.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(java.util.function.Consumer<java.util.Collection<java.lang.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(java.lang.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(java.lang.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(java.util.function.Predicate<java.lang.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(java.lang.Class<? extends java.lang.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(java.util.function.Predicate<java.util.Collection<java.lang.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(java.util.function.Consumer<java.util.Collection<java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.util.function.Predicate<java.lang.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(java.lang.Class<? extends java.lang.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(java.util.function.Predicate<java.util.Collection<Tuple2<java.util.Optional<java.lang.Throwable>,java.util.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(java.util.function.Consumer<java.util.Collection<Tuple2<java.util.Optional<java.lang.Throwable>,java.util.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(java.lang.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(java.lang.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(java.time.Duration d)
Assert that the whole verification took strictly less than the provided
duration to execute.
|
StepVerifier.Assertions |
StepVerifier.Assertions.tookMoreThan(java.time.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(java.time.Duration duration)
Verifies the signals received by this subscriber, then exposes
various assertion methods on the final state. |