Package | Description |
---|---|
org.springframework.test.web.reactive.server |
Support for testing Spring WebFlux server endpoints via
WebTestClient . |
Modifier and Type | Method and Description |
---|---|
WebTestClient.ResponseSpec |
HeaderAssertions.cacheControl(CacheControl cacheControl)
Expect a "Cache-Control" header with the given value.
|
WebTestClient.ResponseSpec |
HeaderAssertions.contentDisposition(ContentDisposition contentDisposition)
Expect a "Content-Disposition" header with the given value.
|
WebTestClient.ResponseSpec |
HeaderAssertions.contentLength(long contentLength)
Expect a "Content-Length" header with the given value.
|
WebTestClient.ResponseSpec |
HeaderAssertions.contentType(MediaType mediaType)
Expect a "Content-Type" header with the given value.
|
WebTestClient.ResponseSpec |
HeaderAssertions.contentType(String mediaType)
Expect a "Content-Type" header with the given value.
|
WebTestClient.ResponseSpec |
HeaderAssertions.contentTypeCompatibleWith(MediaType mediaType)
Expect a "Content-Type" header compatible with the given value.
|
WebTestClient.ResponseSpec |
HeaderAssertions.contentTypeCompatibleWith(String mediaType)
Expect a "Content-Type" header compatible with the given value.
|
WebTestClient.ResponseSpec |
HeaderAssertions.doesNotExist(String name)
Expect that the header with the given name is not present.
|
WebTestClient.ResponseSpec |
WebTestClient.RequestHeadersSpec.exchange()
Perform the exchange without a request body.
|
WebTestClient.ResponseSpec |
HeaderAssertions.exists(String name)
Expect that the header with the given name is present.
|
WebTestClient.ResponseSpec |
HeaderAssertions.expires(long expires)
Expect an "Expires" header with the given value.
|
WebTestClient.ResponseSpec |
StatusAssertions.is1xxInformational()
Assert the response status code is in the 1xx range.
|
WebTestClient.ResponseSpec |
StatusAssertions.is2xxSuccessful()
Assert the response status code is in the 2xx range.
|
WebTestClient.ResponseSpec |
StatusAssertions.is3xxRedirection()
Assert the response status code is in the 3xx range.
|
WebTestClient.ResponseSpec |
StatusAssertions.is4xxClientError()
Assert the response status code is in the 4xx range.
|
WebTestClient.ResponseSpec |
StatusAssertions.is5xxServerError()
Assert the response status code is in the 5xx range.
|
WebTestClient.ResponseSpec |
StatusAssertions.isAccepted()
Assert the response status code is
HttpStatus.ACCEPTED (202). |
WebTestClient.ResponseSpec |
StatusAssertions.isBadRequest()
Assert the response status code is
HttpStatus.BAD_REQUEST (400). |
WebTestClient.ResponseSpec |
StatusAssertions.isCreated()
Assert the response status code is
HttpStatus.CREATED (201). |
WebTestClient.ResponseSpec |
StatusAssertions.isEqualTo(HttpStatus status)
Assert the response status as an
HttpStatus . |
WebTestClient.ResponseSpec |
StatusAssertions.isEqualTo(int status)
Assert the response status as an integer.
|
WebTestClient.ResponseSpec |
StatusAssertions.isForbidden()
Assert the response status code is
HttpStatus.FORBIDDEN (403). |
WebTestClient.ResponseSpec |
StatusAssertions.isFound()
Assert the response status code is
HttpStatus.FOUND (302). |
WebTestClient.ResponseSpec |
StatusAssertions.isNoContent()
Assert the response status code is
HttpStatus.NO_CONTENT (204). |
WebTestClient.ResponseSpec |
StatusAssertions.isNotFound()
Assert the response status code is
HttpStatus.NOT_FOUND (404). |
WebTestClient.ResponseSpec |
StatusAssertions.isNotModified()
Assert the response status code is
HttpStatus.NOT_MODIFIED (304). |
WebTestClient.ResponseSpec |
StatusAssertions.isOk()
Assert the response status code is
HttpStatus.OK (200). |
WebTestClient.ResponseSpec |
StatusAssertions.isPermanentRedirect()
Assert the response status code is
HttpStatus.PERMANENT_REDIRECT (308). |
WebTestClient.ResponseSpec |
StatusAssertions.isSeeOther()
Assert the response status code is
HttpStatus.SEE_OTHER (303). |
WebTestClient.ResponseSpec |
StatusAssertions.isTemporaryRedirect()
Assert the response status code is
HttpStatus.TEMPORARY_REDIRECT (307). |
WebTestClient.ResponseSpec |
StatusAssertions.isUnauthorized()
Assert the response status code is
HttpStatus.UNAUTHORIZED (401). |
WebTestClient.ResponseSpec |
HeaderAssertions.lastModified(long lastModified)
Expect a "Last-Modified" header with the given value.
|
WebTestClient.ResponseSpec |
StatusAssertions.reasonEquals(String reason)
Assert the response error message.
|
WebTestClient.ResponseSpec |
StatusAssertions.value(Consumer<Integer> consumer)
Consume the response status value as an integer.
|
WebTestClient.ResponseSpec |
StatusAssertions.value(Matcher<Integer> matcher)
Match the response status value with a Hamcrest matcher.
|
WebTestClient.ResponseSpec |
HeaderAssertions.value(String name,
Consumer<String> consumer)
Consume the first value of the response header.
|
WebTestClient.ResponseSpec |
HeaderAssertions.value(String name,
Matcher<? super String> matcher)
Assert the first value of the response header with a Hamcrest
Matcher . |
WebTestClient.ResponseSpec |
HeaderAssertions.valueEquals(String headerName,
String... values)
Expect a header with the given name to match the specified values.
|
WebTestClient.ResponseSpec |
HeaderAssertions.valueMatches(String name,
String pattern)
Match the first value of the response header with a regex.
|