Uses of Class
org.springframework.test.web.servlet.client.assertj.RestTestClientResponseAssert
Packages that use RestTestClientResponseAssert
Package
Description
AssertJ support for RestTestClient.
-
Uses of RestTestClientResponseAssert in org.springframework.test.web.servlet.client.assertj
Subclasses with type arguments of type RestTestClientResponseAssert in org.springframework.test.web.servlet.client.assertjModifier and TypeClassDescriptionclassAssertJ assertions for the result from aRestTestClientexchange.Subinterfaces with type arguments of type RestTestClientResponseAssert in org.springframework.test.web.servlet.client.assertjModifier and TypeInterfaceDescriptioninterfaceAssertProviderforRestTestClientResponseAssertthat holds the result of an exchange performed throughRestTestClient.Methods in org.springframework.test.web.servlet.client.assertj that return RestTestClientResponseAssertModifier and TypeMethodDescriptionRestTestClientResponseAssert.containsHeader(String name) Verify that the response contains a header with the givenname.RestTestClientResponseAssert.doesNotContainHeader(String name) Verify that the response does not contain a header with the givenname.RestTestClientResponseAssert.hasBodyTextEqualTo(String bodyText) Verify that the response body is equal to the given value.RestTestClientResponseAssert.hasContentType(String contentType) Verify that the response'sContent-Typeis equal to the given string representation.RestTestClientResponseAssert.hasContentType(org.springframework.http.MediaType contentType) Verify that the response'sContent-Typeis equal to the given value.RestTestClientResponseAssert.hasContentTypeCompatibleWith(String contentType) Verify that the response'sContent-Typeis compatible with the given string representation.RestTestClientResponseAssert.hasContentTypeCompatibleWith(org.springframework.http.MediaType contentType) Verify that the response'sContent-Typeis compatible with the given value.Verify that the response contains a header with the givennameand primaryvalue.RestTestClientResponseAssert.hasStatus(int status) Verify that the HTTP status is equal to the specified status code.RestTestClientResponseAssert.hasStatus(org.springframework.http.HttpStatus status) Verify that the HTTP status is equal to the specified status.RestTestClientResponseAssert.hasStatus1xxInformational()Verify that the HTTP status code is in the 1xx range.RestTestClientResponseAssert.hasStatus2xxSuccessful()Verify that the HTTP status code is in the 2xx range.RestTestClientResponseAssert.hasStatus3xxRedirection()Verify that the HTTP status code is in the 3xx range.RestTestClientResponseAssert.hasStatus4xxClientError()Verify that the HTTP status code is in the 4xx range.RestTestClientResponseAssert.hasStatus5xxServerError()Verify that the HTTP status code is in the 5xx range.RestTestClientResponseAssert.hasStatusOk()Verify that the HTTP status is equal toHttpStatus.OK.