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 "Max-Age" attribute.Assert a cookie's "Max-Age" attribute with a HamcrestMatcher.partitioned(String name, boolean expected) Assert a cookie's "Partitioned" attribute.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 with the given name.Assert the value of the response cookie with the given name with a HamcrestMatcher.valueEquals(String name, String value) Expect a response cookie with the given name to match the specified value.
- 
Constructor Details- 
CookieAssertions
 
- 
- 
Method Details- 
valueEqualsExpect a response cookie with the given name to match the specified value.
- 
valueAssert the value of the response cookie with the given name with a HamcrestMatcher.
- 
valueConsume the value of the response cookie with the given name.
- 
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 "Max-Age" attribute.
- 
maxAgeAssert a cookie's "Max-Age" 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.
- 
partitionedAssert a cookie's "Partitioned" attribute.- Since:
- 6.2
 
- 
sameSiteAssert a cookie's "SameSite" attribute.
 
-