List of usage examples for org.apache.http.cookie Cookie equals
public boolean equals(Object obj)
From source file:org.auraframework.integration.test.util.AuraHttpTestCase.java
/** * Checks there is no cookie in httpclient cookie store * * @param domain cookie domain/*ww w. j ava 2 s.c o m*/ * @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); } } }
From source file:org.auraframework.integration.test.util.AuraHttpTestCase.java
/** * Checks for cookie// w w w. ja v a 2s . c om * * @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); }