Interface WebTestClient.ListBodySpec<E>
- Type Parameters:
E- the body list element type
- All Superinterfaces:
WebTestClient.BodySpec<List<@Nullable E>, WebTestClient.ListBodySpec<E>>
- Enclosing interface:
WebTestClient
public static interface WebTestClient.ListBodySpec<E>
extends WebTestClient.BodySpec<List<@Nullable E>, WebTestClient.ListBodySpec<E>>
Spec for expectations on the response body decoded to a List.
- Since:
- 5.0
- Author:
- Rossen Stoyanchev, Brian Clozel, Sam Brannen, MichaĆ Rowicki
-
Method Summary
Modifier and TypeMethodDescriptionAssert the extracted list of values contains the given elements.doesNotContain(@Nullable E... elements) Assert the extracted list of values doesn't contain the given elements.hasSize(int size) Assert the extracted list of values is of the given size.Methods inherited from interface org.springframework.test.web.reactive.server.WebTestClient.BodySpec
consumeWith, isEqualTo, returnResult, value, value, value
-
Method Details
-
hasSize
Assert the extracted list of values is of the given size.- Parameters:
size- the expected size
-
contains
Assert the extracted list of values contains the given elements.- Parameters:
elements- the elements to check
-
doesNotContain
Assert the extracted list of values doesn't contain the given elements.- Parameters:
elements- the elements to check
-