类 CookieResultMatchers
java.lang.Object
cn.taketoday.test.web.servlet.result.CookieResultMatchers
Factory for response cookie assertions.
An instance of this class is typically accessed via
MockMvcResultMatchers.cookie().
- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev, Thomas Bruyelle, Harry Yang
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明doesNotExist(String name) Assert a cookie does not exist.Assert a cookie's domain.Assert a cookie's domain with a HamcrestMatcher.Assert a cookie exists.private static cn.taketoday.http.ResponseCookieprivate static cn.taketoday.http.ResponseCookieAssert whether the cookie must be HTTP only.Assert a cookie's maxAge.Assert a cookie's maxAge.Assert a cookie's maxAge with a HamcrestMatcher.Assert a cookie's path.Assert a cookie's path with a HamcrestMatcher.Assert a cookie's SameSite attribute.Assert a cookie's SameSite attribute with a HamcrestMatcher.Assert whether the cookie must be sent over a secure protocol or not.Assert a cookie value.Assert a cookie value with the given HamcrestMatcher.
-
构造器详细资料
-
CookieResultMatchers
protected CookieResultMatchers()Protected constructor. UseMockMvcResultMatchers.cookie().
-
-
方法详细资料
-
value
Assert a cookie value with the given HamcrestMatcher. -
value
Assert a cookie value. -
exists
Assert a cookie exists. The existence check is irrespective of whether max age is 0 (i.e. expired). -
doesNotExist
Assert a cookie does not exist. Note that the existence check is irrespective of whether max age is 0, i.e. expired. -
maxAge
Assert a cookie's maxAge with a HamcrestMatcher. -
maxAge
Assert a cookie's maxAge. -
maxAge
Assert a cookie's maxAge. -
path
Assert a cookie's path with a HamcrestMatcher. -
path
Assert a cookie's path. -
domain
Assert a cookie's domain with a HamcrestMatcher. -
domain
Assert a cookie's domain. -
sameSite
Assert a cookie's SameSite attribute with a HamcrestMatcher. -
sameSite
Assert a cookie's SameSite attribute. -
secure
Assert whether the cookie must be sent over a secure protocol or not. -
httpOnly
Assert whether the cookie must be HTTP only. -
getCookie
-
getCookie
@Nullable private static cn.taketoday.http.ResponseCookie getCookie(cn.taketoday.web.RequestContext context, String cookieName)
-