T - the type of the sequencepublic static interface StepVerifier.ContextExpectations<T>
Context propagated during the Subscription
phase. You then need to resume to the StepVerifier assertion of the sequence
by using then().| Modifier and Type | Method and Description |
|---|---|
StepVerifier.ContextExpectations<T> |
assertThat(java.util.function.Consumer<Context> assertingConsumer)
Apply custom assertions to the propagated
Context. |
StepVerifier.ContextExpectations<T> |
contains(java.lang.Object key,
java.lang.Object value)
Check that the propagated
Context contains the given value associated
to the given key. |
StepVerifier.ContextExpectations<T> |
containsAllOf(Context other)
|
StepVerifier.ContextExpectations<T> |
containsAllOf(java.util.Map<?,?> other)
Check that the propagated
Context contains all of the key-value pairs
of the given Map. |
StepVerifier.ContextExpectations<T> |
containsOnly(Context other)
|
StepVerifier.ContextExpectations<T> |
containsOnly(java.util.Map<?,?> other)
Check that the propagated
Context contains all of the key-value pairs
of the given Map, and nothing else. |
StepVerifier.ContextExpectations<T> |
hasKey(java.lang.Object key)
Check that the propagated
Context contains a value for the given key. |
StepVerifier.ContextExpectations<T> |
hasSize(int size)
Check that the propagated
Context is of the given size. |
StepVerifier.ContextExpectations<T> |
matches(java.util.function.Predicate<Context> predicate)
Check that the propagated
Context matches a given Predicate. |
StepVerifier.ContextExpectations<T> |
matches(java.util.function.Predicate<Context> predicate,
java.lang.String description)
Check that the propagated
Context matches a given Predicate
that is given a description. |
StepVerifier.Step<T> |
then()
Add the context checks set up by this
StepVerifier.ContextExpectations as a
StepVerifier expectation, and return the current StepVerifier.Step in order
to build further sequence expectations and ultimately verify the sequence. |
StepVerifier.ContextExpectations<T> hasKey(java.lang.Object key)
Context contains a value for the given key.key - the key to checkStepVerifier.ContextExpectations for further Context checkingStepVerifier.ContextExpectations<T> hasSize(int size)
Context is of the given size.size - the expected sizeStepVerifier.ContextExpectations for further Context checkingStepVerifier.ContextExpectations<T> contains(java.lang.Object key, java.lang.Object value)
Context contains the given value associated
to the given key.key - the key to check forvalue - the expected value for that keyStepVerifier.ContextExpectations for further Context checkingStepVerifier.ContextExpectations<T> containsAllOf(Context other)
other - the other Context whose key-value pairs are expected to be
all contained by the propagated Context.StepVerifier.ContextExpectations for further Context checkingStepVerifier.ContextExpectations<T> containsAllOf(java.util.Map<?,?> other)
Context contains all of the key-value pairs
of the given Map.other - the other Map whose key-value pairs are expected to be all
contained by the propagated Context.StepVerifier.ContextExpectations for further Context checkingStepVerifier.ContextExpectations<T> containsOnly(Context other)
Context contains all of the key-value pairs
of the given Context, and nothing else.other - the Context representing the exact expected content of the
propagated Context.StepVerifier.ContextExpectations for further Context checkingStepVerifier.ContextExpectations<T> containsOnly(java.util.Map<?,?> other)
Context contains all of the key-value pairs
of the given Map, and nothing else.other - the Map representing the exact expected content of the
propagated Context.StepVerifier.ContextExpectations for further Context checkingStepVerifier.ContextExpectations<T> assertThat(java.util.function.Consumer<Context> assertingConsumer)
Context.assertingConsumer - a Consumer for the Context that applies
custom assertions.StepVerifier.ContextExpectations for further Context checkingStepVerifier.ContextExpectations<T> matches(java.util.function.Predicate<Context> predicate)
Context matches a given Predicate.predicate - a Predicate to test with the Context.StepVerifier.ContextExpectations for further Context checkingStepVerifier.ContextExpectations<T> matches(java.util.function.Predicate<Context> predicate, java.lang.String description)
Context matches a given Predicate
that is given a description.predicate - a Predicate to test with the Contextdescription - the description for the Predicate, which will be part of
the AssertionError if the predicate fails.StepVerifier.ContextExpectations for further Context checkingStepVerifier.Step<T> then()
StepVerifier.ContextExpectations as a
StepVerifier expectation, and return the current StepVerifier.Step in order
to build further sequence expectations and ultimately verify the sequence.StepVerifier.Step for further building of expectations.