Uses of Interface
org.springframework.test.web.reactive.server.WebTestClient.ResponseSpec
Packages that use WebTestClient.ResponseSpec
-
Uses of WebTestClient.ResponseSpec in org.springframework.test.web.reactive.server
Methods in org.springframework.test.web.reactive.server that return WebTestClient.ResponseSpecModifier and TypeMethodDescriptionHeaderAssertions.cacheControl
(CacheControl cacheControl) Expect a "Cache-Control" header with the given value.HeaderAssertions.contentDisposition
(ContentDisposition contentDisposition) Expect a "Content-Disposition" header with the given value.HeaderAssertions.contentLength
(long contentLength) Expect a "Content-Length" header with the given value.HeaderAssertions.contentType
(String mediaType) Expect a "Content-Type" header with the given value.HeaderAssertions.contentType
(MediaType mediaType) Expect a "Content-Type" header with the given value.HeaderAssertions.contentTypeCompatibleWith
(String mediaType) Expect a "Content-Type" header compatible with the given value.HeaderAssertions.contentTypeCompatibleWith
(MediaType mediaType) Expect a "Content-Type" header compatible with the given value.CookieAssertions.doesNotExist
(String name) Expect that the cookie with the given name is not present.HeaderAssertions.doesNotExist
(String name) Expect that the header with the given name is not present.Assert a cookie's "Domain" attribute.Assert a cookie's "Domain" attribute with a HamcrestMatcher
.WebTestClient.RequestHeadersSpec.exchange()
Perform the exchange without a request body.Expect that the cookie with the given name is present.Expect that the header with the given name is present.WebTestClient.ResponseSpec.expectAll
(WebTestClient.ResponseSpec.ResponseSpecConsumer... consumers) Apply multiple assertions to a response with the given consumers, with the guarantee that all assertions will be applied even if one or more assertions fails with an exception.HeaderAssertions.expires
(long expires) Expect an "Expires" header with the given value.Assert a cookie's "HttpOnly" attribute.StatusAssertions.is1xxInformational()
Assert the response status code is in the 1xx range.StatusAssertions.is2xxSuccessful()
Assert the response status code is in the 2xx range.StatusAssertions.is3xxRedirection()
Assert the response status code is in the 3xx range.StatusAssertions.is4xxClientError()
Assert the response status code is in the 4xx range.StatusAssertions.is5xxServerError()
Assert the response status code is in the 5xx range.StatusAssertions.isAccepted()
Assert the response status code isHttpStatus.ACCEPTED
(202).StatusAssertions.isBadRequest()
Assert the response status code isHttpStatus.BAD_REQUEST
(400).StatusAssertions.isCreated()
Assert the response status code isHttpStatus.CREATED
(201).StatusAssertions.isEqualTo
(int status) Assert the response status as an integer.StatusAssertions.isEqualTo
(HttpStatusCode status) Assert the response status as anHttpStatusCode
.StatusAssertions.isForbidden()
Assert the response status code isHttpStatus.FORBIDDEN
(403).StatusAssertions.isFound()
Assert the response status code isHttpStatus.FOUND
(302).StatusAssertions.isNoContent()
Assert the response status code isHttpStatus.NO_CONTENT
(204).StatusAssertions.isNotFound()
Assert the response status code isHttpStatus.NOT_FOUND
(404).StatusAssertions.isNotModified()
Assert the response status code isHttpStatus.NOT_MODIFIED
(304).StatusAssertions.isOk()
Assert the response status code isHttpStatus.OK
(200).StatusAssertions.isPermanentRedirect()
Assert the response status code isHttpStatus.PERMANENT_REDIRECT
(308).StatusAssertions.isSeeOther()
Assert the response status code isHttpStatus.SEE_OTHER
(303).StatusAssertions.isTemporaryRedirect()
Assert the response status code isHttpStatus.TEMPORARY_REDIRECT
(307).StatusAssertions.isUnauthorized()
Assert the response status code isHttpStatus.UNAUTHORIZED
(401).HeaderAssertions.lastModified
(long lastModified) Expect a "Last-Modified" header with the given value.Expect a "Location" header with the given value.Assert a cookie's "Max-Age" attribute.Assert a cookie's "Max-Age" attribute with a HamcrestMatcher
.CookieAssertions.partitioned
(String name, boolean expected) Assert a cookie's "Partitioned" attribute.Assert a cookie's "Path" attribute.Assert a cookie's "Path" attribute with a HamcrestMatcher
.StatusAssertions.reasonEquals
(String reason) Assert the response error message.Assert a cookie's "SameSite" attribute.Assert a cookie's "Secure" attribute.Consume the value of the response cookie with the given name.Assert the value of the response cookie with the given name with a HamcrestMatcher
.Consume the first value of the named response header.Assert the first value of the response header with a HamcrestMatcher
.Consume the response status value as an integer.Match the response status value with a Hamcrest matcher.CookieAssertions.valueEquals
(String name, String value) Expect a response cookie with the given name to match the specified value.HeaderAssertions.valueEquals
(String headerName, long value) Expect a header with the given name to match the given long value.HeaderAssertions.valueEquals
(String headerName, String... values) Expect a header with the given name to match the specified values.HeaderAssertions.valueEqualsDate
(String headerName, long value) Expect a header with the given name to match the specified long value parsed into a date using the preferred date format described in RFC 7231.HeaderAssertions.valueMatches
(String name, String pattern) Match the first value of the response header with a regex.Consume all values of the named response header.Assert all values of the response header with a HamcrestMatcher
.HeaderAssertions.valuesMatch
(String name, String... patterns) Match all values of the response header with the given regex patterns which are applied to the values of the header in the same order.Constructors in org.springframework.test.web.reactive.server with parameters of type WebTestClient.ResponseSpecModifierConstructorDescriptionCookieAssertions
(ExchangeResult exchangeResult, WebTestClient.ResponseSpec responseSpec)