程序包 | 说明 |
---|---|
reactor.test |
Main test components supporting the testing and assertion of publishers.
|
限定符和类型 | 方法和说明 |
---|---|
StepVerifierOptions |
StepVerifierOptions.checkUnderRequesting(boolean enabled)
Activate or deactivate the
StepVerifier check of request amount
being too low. |
StepVerifierOptions |
StepVerifierOptions.copy()
Make a copy of this
StepVerifierOptions instance. |
static StepVerifierOptions |
StepVerifierOptions.create()
Create a new default set of options for a
StepVerifier that can be tuned
using the various available non-getter methods (which can be chained). |
<T> StepVerifierOptions |
StepVerifierOptions.extractor(ValueFormatters.Extractor<T> extractor)
Add an
ValueFormatters.Extractor , replacing any existing ValueFormatters.Extractor that targets the
same Class (as in ValueFormatters.Extractor.getTargetClass() ). |
StepVerifierOptions |
StepVerifierOptions.initialRequest(long initialRequest)
Set the amount the
StepVerifier should request initially. |
StepVerifierOptions |
StepVerifierOptions.scenarioName(java.lang.String scenarioName)
Give a name to the whole scenario tested by the configured
StepVerifier . |
StepVerifierOptions |
StepVerifierOptions.valueFormatter(ValueFormatters.ToStringConverter valueFormatter)
Set up a custom value formatter to be used in error messages when presenting
expected and actual values.
|
StepVerifierOptions |
StepVerifierOptions.virtualTimeSchedulerSupplier(java.util.function.Supplier<? extends VirtualTimeScheduler> vtsLookup)
Set a supplier for a
VirtualTimeScheduler , which is mandatory for a
StepVerifier to work with virtual time. |
StepVerifierOptions |
StepVerifierOptions.withInitialContext(Context context)
Set an initial
Context to be propagated by the StepVerifier when it
subscribes to the sequence under test. |
限定符和类型 | 方法和说明 |
---|---|
static <T> StepVerifier.FirstStep<T> |
StepVerifier.create(org.reactivestreams.Publisher<? extends T> publisher,
StepVerifierOptions options)
Prepare a new
StepVerifier in an uncontrolled environment:
StepVerifier.Step.thenAwait() will block in real time. |
static <T> StepVerifier.FirstStep<T> |
StepVerifier.withVirtualTime(java.util.function.Supplier<? extends org.reactivestreams.Publisher<? extends T>> scenarioSupplier,
StepVerifierOptions options)
Prepare a new
StepVerifier in a controlled environment using
a user-provided VirtualTimeScheduler to manipulate a virtual clock via
StepVerifier.Step.thenAwait() . |