Uses of Class
org.springframework.test.http.HttpHeadersAssert
Package
Description
Test support for HTTP concepts.
AssertJ support for MockMvc.
-
Uses of HttpHeadersAssert in org.springframework.test.http
Modifier and TypeMethodDescriptionHttpHeadersAssert.containsHeader
(String name) Verify that the actual HTTP headers contain a header with the givenname
.HttpHeadersAssert.containsHeaders
(String... names) Verify that the actual HTTP headers contain the headers with the givennames
.HttpHeadersAssert.containsOnlyHeaders
(String... names) Verify that the actual HTTP headers contain only the headers with the givennames
, in any order and in a case-insensitive manner.HttpHeadersAssert.doesNotContainHeader
(String name) Verify that the actual HTTP headers do not contain a header with the givenname
.HttpHeadersAssert.doesNotContainHeaders
(String... names) Verify that the actual HTTP headers do not contain any of the headers with the givennames
.HttpHeadersAssert.hasExactlyValues
(String name, List<String> values) Verify that the given header has a full list of values exactly equal to the given list of values, and in the same order.HttpHeadersAssert.hasExactlyValuesInAnyOrder
(String name, List<String> values) Verify that the given header has a full list of values exactly equal to the given list of values, in any order.HttpHeadersAssert.hasHeaderSatisfying
(String name, Consumer<List<String>> valueRequirements) Verify that the actual HTTP headers contain a header with the givenname
that satisfies the givenvalueRequirements
.HttpHeadersAssert.hasSameSizeAs
(HttpHeaders other) Verify that the number of actual headers is the same as in the givenHttpHeaders
.HttpHeadersAssert.hasSingleValue
(String name, long value) Verify that the actual HTTP headers contain a header with the givenname
andlong
primaryvalue
.HttpHeadersAssert.hasSingleValue
(String name, String value) HttpHeadersAssert.hasSingleValue
(String name, Instant value) HttpHeadersAssert.hasSize
(int expected) Verify that there are exactlyexpected
headers present, when considering header names in a case-insensitive manner.Verify that the actual HTTP headers contain a header with the givenname
andlong
primaryvalue
.HttpHeadersAssert.isEmpty()
Verify that the actual HTTP headers are empty and no header is present.HttpHeadersAssert.isNotEmpty()
Verify that the actual HTTP headers are not empty and at least one header is present. -
Uses of HttpHeadersAssert in org.springframework.test.web.servlet.assertj
Modifier and TypeMethodDescriptionAbstractHttpServletResponseAssert.headers()
Return a new assertion object that usesHttpHeaders
as the object to test.