/** * Expect that a response cookie matches the supplied name and value. * * @param cookieName The name of the expected cookie * @param expectedValue The value of the expected cookie * @return The builder */ public ResponseSpecBuilder expectCookie(String cookieName, String expectedValue) { spec.cookie(cookieName, expectedValue); return this; }
/** * Expect that a cookie exist in the response, regardless of value (it may have no value at all). * * @param cookieName the cookie to validate that it exists * @return the builder */ public ResponseSpecBuilder expectCookie(String cookieName) { spec.cookie(cookieName); return this; }
/** * Expect that a response cookie matches the supplied cookie name and hamcrest matcher. * <p> * E.g. <tt>cookieName1=cookieValue1</tt> * </p> * * @param cookieName The name of the expected cookie * @param expectedValueMatcher The Hamcrest matcher that must conform to the value * @return The builder */ public ResponseSpecBuilder expectCookie(String cookieName, Matcher<String> expectedValueMatcher) { spec.cookie(cookieName, expectedValueMatcher); return this; }