open class CookieResultMatchers
Factory for response cookie assertions.
An instance of this class is typically accessed via MockMvcResultMatchers#cookie.
Author
Rossen Stoyanchev
Author
Thomas Bruyelle
Since
3.2
open fun comment(name: String, matcher: Matcher<in String>): ResultMatcher
Assert a cookie's comment with a Hamcrest Matcher. open fun comment(name: String, comment: String): ResultMatcher
Assert a cookie's comment value. |
|
open fun doesNotExist(name: String): ResultMatcher
Assert a cookie does not exist. Note that the existence check is irrespective of whether max age is 0, i.e. expired. |
|
open fun domain(name: String, matcher: Matcher<in String>): ResultMatcher
Assert a cookie's domain with a Hamcrest Matcher. open fun domain(name: String, domain: String): ResultMatcher
Assert a cookie's domain value. |
|
open fun exists(name: String): ResultMatcher
Assert a cookie exists. The existence check is irrespective of whether max age is 0 (i.e. expired). |
|
open fun httpOnly(name: String, httpOnly: Boolean): ResultMatcher
Assert whether the cookie must be HTTP only. |
|
open fun maxAge(name: String, matcher: Matcher<in Int>): ResultMatcher
Assert a cookie's maxAge with a Hamcrest Matcher. open fun maxAge(name: String, maxAge: Int): ResultMatcher
Assert a cookie's maxAge value. |
|
open fun path(name: String, matcher: Matcher<in String>): ResultMatcher
Assert a cookie path with a Hamcrest Matcher. open fun path(name: String, path: String): ResultMatcher |
|
open fun secure(name: String, secure: Boolean): ResultMatcher
Assert whether the cookie must be sent over a secure protocol or not. |
|
open fun value(name: String, matcher: Matcher<in String>): ResultMatcher
Assert a cookie value with the given Hamcrest Matcher. open fun value(name: String, expectedValue: String): ResultMatcher
Assert a cookie value. |
|
open fun version(name: String, matcher: Matcher<in Int>): ResultMatcher
Assert a cookie's version with a Hamcrest Matcher open fun version(name: String, version: Int): ResultMatcher
Assert a cookie's version value. |