Esempio n. 1
0
 /**
  * Checks there is no cookie in httpclient cookie store
  *
  * @param domain cookie domain
  * @param name cookie name
  * @param path cookie path
  * @throws Exception
  */
 protected void assertNoCookie(String domain, String name, String path) throws Exception {
   Cookie expected = makeCookie(domain, name, null, path);
   for (Cookie cookie : getCookies()) {
     if (expected.equals(cookie)) {
       fail("Cookie was not deleted: " + cookie);
     }
   }
 }
Esempio n. 2
0
 /**
  * Checks for cookie
  *
  * @param domain cookie domain
  * @param name cookie name
  * @param value cookie value
  * @param path cookie path
  * @throws Exception
  */
 protected void assertCookie(String domain, String name, String path, String value)
     throws Exception {
   Cookie expected = makeCookie(domain, name, value, path);
   for (Cookie cookie : getCookies()) {
     if (expected.equals(cookie)) {
       assertEquals("Wrong cookie value!", expected.getValue(), cookie.getValue());
       return;
     }
   }
   fail("Missing cookie, expected " + expected);
 }