コード例 #1
0
 @Test
 public void PostTest() throws FilterException {
   final HTTPRequestHeader req =
       new HTTPRequestHeaderImpl(TestUtils.stringFromFile("http/requests/request3.txt"));
   Assert.assertEquals("POST", req.getMethod());
   Assert.assertEquals("/enlighten/calais.asmx/Enlighten", req.getRequestURI());
   Assert.assertEquals("123", req.getHeader("Content-Length"));
 }
コード例 #2
0
 @Test
 public void GetNoParamTest() throws FilterException {
   final HTTPRequestHeader req =
       new HTTPRequestHeaderImpl(TestUtils.stringFromFile("http/requests/request1.txt"));
   Assert.assertEquals("GET", req.getMethod());
   Assert.assertEquals("/kshmir/pdc-2012/issues/3", req.getRequestURI());
   Assert.assertEquals("keep-alive", req.getHeader("Connection"));
 }