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 Summary
ConstructorsConstructorDescriptionCookieAssertions(ExchangeResult exchangeResult, WebTestClient.ResponseSpec responseSpec) -
Method Summary
Modifier 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
-
valueEquals
Expect a header with the given name to match the specified values. -
value
Assert the first value of the response cookie with a HamcrestMatcher. -
value
Consume the value of the response cookie. -
exists
Expect that the cookie with the given name is present. -
doesNotExist
Expect that the cookie with the given name is not present. -
maxAge
Assert a cookie's maxAge attribute. -
maxAge
Assert a cookie's maxAge attribute with a HamcrestMatcher. -
path
Assert a cookie's path attribute. -
path
Assert a cookie's path attribute with a HamcrestMatcher. -
domain
Assert a cookie's domain attribute. -
domain
Assert a cookie's domain attribute with a HamcrestMatcher. -
secure
Assert a cookie's secure attribute. -
httpOnly
Assert a cookie's httpOnly attribute. -
sameSite
Assert a cookie's sameSite attribute.
-