Class CookieAssertions
java.lang.Object
org.springframework.test.web.reactive.server.CookieAssertions
Assertions on cookies of the response.
- Since:
- 5.3
- Author:
- Rossen Stoyanchev
- 
Constructor SummaryConstructorsConstructorDescriptionCookieAssertions(ExchangeResult exchangeResult, WebTestClient.ResponseSpec responseSpec) 
- 
Method SummaryModifier and TypeMethodDescriptiondoesNotExist(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 a HamcrestMatcher.Expect that the cookie with the given name is present.Assert a cookie's httpOnly attribute.Assert a cookie's maxAge attribute.Assert a cookie's maxAge attribute with a HamcrestMatcher.Assert a cookie's path attribute.Assert a cookie's path attribute with a HamcrestMatcher.Assert a cookie's sameSite attribute.Assert a cookie's secure attribute.Consume the value of the response cookie.Assert the first value of the response cookie with a HamcrestMatcher.valueEquals(String name, String value) Expect a header with the given name to match the specified values.
- 
Constructor Details- 
CookieAssertions
 
- 
- 
Method Details- 
valueEqualsExpect a header with the given name to match the specified values.
- 
valueAssert the first value of the response cookie with a HamcrestMatcher.
- 
valueConsume the value of the response cookie.
- 
existsExpect that the cookie with the given name is present.
- 
doesNotExistExpect that the cookie with the given name is not present.
- 
maxAgeAssert a cookie's maxAge attribute.
- 
maxAgeAssert a cookie's maxAge attribute with a HamcrestMatcher.
- 
pathAssert a cookie's path attribute.
- 
pathAssert a cookie's path attribute with a HamcrestMatcher.
- 
domainAssert a cookie's domain attribute.
- 
domainAssert a cookie's domain attribute with a HamcrestMatcher.
- 
secureAssert a cookie's secure attribute.
- 
httpOnlyAssert a cookie's httpOnly attribute.
- 
sameSiteAssert a cookie's sameSite attribute.
 
-