Class AbstractCookieAssertions<E,R> 
java.lang.Object
org.springframework.test.web.support.AbstractCookieAssertions<E,R> 
- Type Parameters:
- E- the type of the exchange result
- R- the type of the response spec
- Direct Known Subclasses:
- CookieAssertions, CookieAssertions
Assertions on cookies of the response.
- Since:
- 7.0
- Author:
- Rob Worsnop, Rossen Stoyanchev
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedAbstractCookieAssertions(E exchangeResult, R responseSpec) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract voidassertWithDiagnostics(Runnable assertion) Subclasses must implement this to assert with diagnostics.doesNotExist(String name) Expect that the cookie with the given name is not present.Assert a cookie's "Domain" attribute.Assert a cookie's "Domain" attribute with aConsumer.Expect that the cookie with the given name is present.protected ResponseCookieprotected EReturn the exchange result.protected StringgetMessage(String cookie) protected abstract MultiValueMap<String, ResponseCookie> Subclasses must implement this to provide access to response cookies.protected RReturn the response spec.Assert a cookie's "HttpOnly" attribute.Assert a cookie's "Max-Age" attribute.Assert a cookie's "Max-Age" attribute with aConsumer.partitioned(String name, boolean expected) Assert a cookie's "Partitioned" attribute.Assert a cookie's "Path" attribute.Assert a cookie's "Path" attribute with aConsumer.Assert a cookie's "SameSite" attribute.Assert a cookie's "Secure" attribute.Consume the value of the response cookie with the given name.valueEquals(String name, String value) Expect a response cookie with the given name to match the specified value.
- 
Constructor Details- 
AbstractCookieAssertions
 
- 
- 
Method Details- 
getExchangeResultReturn the exchange result.
- 
getResponseSpecReturn the response spec.
- 
getResponseCookiesSubclasses must implement this to provide access to response cookies.
- 
assertWithDiagnosticsSubclasses must implement this to assert with diagnostics.
- 
valueEquals
- 
value
- 
exists
- 
doesNotExist
- 
maxAge
- 
maxAge
- 
path
- 
path
- 
domain
- 
domain
- 
secure
- 
httpOnly
- 
partitioned
- 
sameSite
- 
getCookie
- 
getMessage
 
-