Class CookieAssertions
java.lang.Object
org.springframework.test.web.support.AbstractCookieAssertions<ExchangeResult, WebTestClient.ResponseSpec>
org.springframework.test.web.reactive.server.CookieAssertions
public class CookieAssertions
extends AbstractCookieAssertions<ExchangeResult, WebTestClient.ResponseSpec>
Assertions on cookies of the response.
- Since:
- 5.3
- Author:
- Rossen Stoyanchev, Rob Worsnop
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidassertWithDiagnostics(Runnable assertion) Subclasses must implement this to assert with diagnostics.Deprecated, for removal: This API element is subject to removal in a future version.protected MultiValueMap<String, ResponseCookie> Subclasses must implement this to provide access to response cookies.Deprecated, for removal: This API element is subject to removal in a future version.in favor ofConsumer-based variantsDeprecated, for removal: This API element is subject to removal in a future version.in favor ofConsumer-based variantsDeprecated, for removal: This API element is subject to removal in a future version.in favor ofConsumer-based variantsMethods inherited from class AbstractCookieAssertionsdoesNotExist, domain, domain, exists, getCookie, getExchangeResult, getMessage, getResponseSpec, httpOnly, maxAge, maxAge, partitioned, path, path, sameSite, secure, value, valueEquals
- 
Method Details- 
getResponseCookiesDescription copied from class:AbstractCookieAssertionsSubclasses must implement this to provide access to response cookies.- Specified by:
- getResponseCookiesin class- AbstractCookieAssertions<ExchangeResult, WebTestClient.ResponseSpec>
 
- 
assertWithDiagnosticsDescription copied from class:AbstractCookieAssertionsSubclasses must implement this to assert with diagnostics.- Specified by:
- assertWithDiagnosticsin class- AbstractCookieAssertions<ExchangeResult, WebTestClient.ResponseSpec>
 
- 
value@Deprecated(since="7.0", forRemoval=true) public WebTestClient.ResponseSpec value(String name, Matcher<? super String> matcher) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofConsumer-based variantsAssert the value of the response cookie with the given name with a HamcrestMatcher.
- 
maxAge@Deprecated(since="7.0", forRemoval=true) public WebTestClient.ResponseSpec maxAge(String name, Matcher<? super Long> matcher) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofConsumer-based variantsAssert a cookie's "Max-Age" attribute with a HamcrestMatcher.
- 
path@Deprecated(since="7.0", forRemoval=true) public WebTestClient.ResponseSpec path(String name, Matcher<? super String> matcher) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofConsumer-based variantsAssert a cookie's "Path" attribute with a HamcrestMatcher.
- 
domain@Deprecated(since="7.0", forRemoval=true) public WebTestClient.ResponseSpec domain(String name, Matcher<? super String> matcher) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofConsumer-based variantsAssert a cookie's "Domain" attribute with a HamcrestMatcher.
 
- 
Consumer-based variants