Class HeaderAssertions
java.lang.Object
org.springframework.test.web.support.AbstractHeaderAssertions<ExchangeResult, RestTestClient.ResponseSpec>
org.springframework.test.web.servlet.client.HeaderAssertions
public class HeaderAssertions
extends AbstractHeaderAssertions<ExchangeResult, RestTestClient.ResponseSpec>
Assertions on headers of the response.
- Since:
- 7.0
- Author:
- Rob Worsnop
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
assertWithDiagnostics
(Runnable assertion) Subclasses must implement this to assert with diagnostics.protected HttpHeaders
Subclasses must implement this to provide access to response headers.Methods inherited from class org.springframework.test.web.support.AbstractHeaderAssertions
cacheControl, contentDisposition, contentLength, contentType, contentType, contentTypeCompatibleWith, contentTypeCompatibleWith, doesNotExist, exists, expires, getExchangeResult, lastModified, location, value, value, valueEquals, valueEquals, valueEqualsDate, valueMatches, values, values, valuesMatch
-
Method Details
-
getResponseHeaders
Description copied from class:AbstractHeaderAssertions
Subclasses must implement this to provide access to response headers.- Specified by:
getResponseHeaders
in classAbstractHeaderAssertions<ExchangeResult, RestTestClient.ResponseSpec>
-
assertWithDiagnostics
Description copied from class:AbstractHeaderAssertions
Subclasses must implement this to assert with diagnostics.- Specified by:
assertWithDiagnostics
in classAbstractHeaderAssertions<ExchangeResult, RestTestClient.ResponseSpec>
-