public void testSettingCookies() throws Exception { server.setCookie("TestCookie", "TestCookieValue"); sendGetRequest(); sendGetRequest(); String[] expectedCookie = new String[] {"TestCookie", "TestCookieValue"}; server.hasReceivedRequest("/", HttpServer.NO_PARAMS, expectedCookie); }
@Override public void tearDown() throws Exception { server.stop(); super.tearDown(); }
public void testExecuteGetRequest() throws Exception { HttpResponse response = sendGetRequest(); server.hasReceivedRequest("/"); assertEquals(200, response.getStatusLine().getStatusCode()); }