程序包 | 说明 |
---|---|
reactor.test |
Main test components supporting the testing and assertion of publishers.
|
限定符和类型 | 方法和说明 |
---|---|
StepVerifier |
StepVerifier.LastStep.consumeErrorWith(java.util.function.Consumer<java.lang.Throwable> consumer)
Expect an error and consume with the given consumer.
|
StepVerifier |
StepVerifier.LastStep.expectComplete()
Expect the completion signal.
|
StepVerifier |
StepVerifier.LastStep.expectError()
Expect an unspecified error.
|
StepVerifier |
StepVerifier.LastStep.expectError(java.lang.Class<? extends java.lang.Throwable> clazz)
Expect an error of the specified type.
|
StepVerifier |
StepVerifier.LastStep.expectErrorMatches(java.util.function.Predicate<java.lang.Throwable> predicate)
Expect an error and evaluate with the given predicate.
|
StepVerifier |
StepVerifier.LastStep.expectErrorMessage(java.lang.String errorMessage)
Expect an error with the specified message.
|
StepVerifier |
StepVerifier.LastStep.expectErrorSatisfies(java.util.function.Consumer<java.lang.Throwable> assertionConsumer)
Expect an error and assert it via assertion(s) provided as a
Consumer . |
StepVerifier |
StepVerifier.LastStep.expectTimeout(java.time.Duration duration)
Verify that the
Publisher under test doesn't terminate but
rather times out after the provided Duration (a timeout implying
a cancellation of the source). |
StepVerifier |
StepVerifier.log()
Activate debug logging of a description of the test scenario, as well as
some details about certain verification steps.
|
StepVerifier |
StepVerifier.LastStep.thenCancel()
Cancel the underlying subscription.
|
StepVerifier |
StepVerifier.verifyLater()
Trigger the subscription and prepare for verifications but doesn't block.
|