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()
.StepVerifier.ContextExpectations<T> hasKey(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(Object key, 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(Map<?,?> other)
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(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(Consumer<Context> assertingConsumer)
Context
.assertingConsumer
- a Consumer
for the Context
that applies
custom assertions.StepVerifier.ContextExpectations
for further Context checkingStepVerifier.ContextExpectations<T> matches(Predicate<Context> predicate)
predicate
- a Predicate
to test with the Context
.StepVerifier.ContextExpectations
for further Context checkingStepVerifier.ContextExpectations<T> matches(Predicate<Context> predicate, String description)
predicate
- a Predicate
to test with the Context
description
- 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.