Interface WebTestClient.ListBodySpec<E>

Type Parameters:
E - the body list element type
All Superinterfaces:
WebTestClient.BodySpec<List<E>,WebTestClient.ListBodySpec<E>>
Enclosing interface:
WebTestClient

public static interface WebTestClient.ListBodySpec<E> extends WebTestClient.BodySpec<List<E>,WebTestClient.ListBodySpec<E>>
Spec for expectations on the response body decoded to a List.
  • Method Details

    • hasSize

      WebTestClient.ListBodySpec<E> hasSize(int size)
      Assert the extracted list of values is of the given size.
      Parameters:
      size - the expected size
    • contains

      WebTestClient.ListBodySpec<E> contains(E... elements)
      Assert the extracted list of values contains the given elements.
      Parameters:
      elements - the elements to check
    • doesNotContain

      WebTestClient.ListBodySpec<E> doesNotContain(E... elements)
      Assert the extracted list of values doesn't contain the given elements.
      Parameters:
      elements - the elements to check