TestCookieServletpublic class TestCookieServlet extends org.apache.cactus.ServletTestCase
Fields Summary |
---|
private CookieServlet | servlet |
Constructors Summary |
---|
public TestCookieServlet(String name)
super(name);
|
Methods Summary |
---|
public void | beginGetUpdatedCookie(org.apache.cactus.WebRequest req)
req.addCookie(CookieServlet.TEST_COOKIE_NAME, "3");
| public void | endGetUpdatedCookie(org.apache.cactus.WebResponse res)
org.apache.cactus.Cookie cookie =
res.getCookie(CookieServlet.TEST_COOKIE_NAME);
assertNotNull("Returned Cookie.", cookie);
assertEquals("Cookie Value.", "4", cookie.getValue());
| protected void | setUp()
this.servlet = new CookieServlet();
| public void | testGetInitialCookie()
Cookie cookie = this.servlet.getCookie(this.request);
assertNotNull("Cookie.", cookie);
assertEquals("Cookie Name.",
CookieServlet.TEST_COOKIE_NAME,
cookie.getName());
assertEquals("Cookie Value.",
"0",
cookie.getValue());
| public void | testGetUpdatedCookie()
this.servlet.doGet(this.request, this.response);
|
|