Save This Page
Home » cactus-1.8.0-src » org.apache.cactus.sample.servlet » [javadoc | source]
org.apache.cactus.sample.servlet
public class: TestSampleServlet [javadoc | source]
java.lang.Object
   junit.framework.TestCase
      org.apache.cactus.internal.AbstractCactusTestCase
         org.apache.cactus.ServletTestCase
            org.apache.cactus.sample.servlet.TestSampleServlet

All Implemented Interfaces:
    CactusTestCase

Tests of the SampleServlet servlet class.
Fields inherited from org.apache.cactus.ServletTestCase:
request,  response,  session,  config
Method from org.apache.cactus.sample.servlet.TestSampleServlet Summary:
beginPostMethod,   beginReceiveCookie,   beginSendCookie,   beginSendHeader,   beginSendMultipleCookies,   beginSendParams,   endReadServletOutputStream,   endReceiveCookie,   endReceiveHeader,   endRequestDispatcherForward,   endRequestDispatcherInclude,   testGetMethod,   testPostMethod,   testReadServletOutputStream,   testReceiveCookie,   testReceiveHeader,   testRequestDispatcherForward,   testRequestDispatcherInclude,   testSendCookie,   testSendHeader,   testSendMultipleCookies,   testSendParams,   testSetAttribute,   testSetRequestAttribute
Methods from org.apache.cactus.ServletTestCase:
createProtocolHandler
Methods from org.apache.cactus.internal.AbstractCactusTestCase:
createProtocolHandler,   runBare,   runBareServer
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cactus.sample.servlet.TestSampleServlet Detail:
 public  void beginPostMethod(WebRequest theRequest) 
    Verify that we can simulate a POST request to a servlet. Note that we send a parameter to force a POST.
 public  void beginReceiveCookie(WebRequest theRequest) 
    Test that it is possible to send back a Cookie and verify it on the client side.
 public  void beginSendCookie(WebRequest theRequest) 
    Verify that we can simulate a single cookie sent in the HTTP request.
 public  void beginSendHeader(WebRequest theRequest) 
    Verify that we can simulate HTTP headers in the HTTP request.
 public  void beginSendMultipleCookies(WebRequest theRequest) 
    Verify that we can simulate multiple cookies sent in the HTTP request.
 public  void beginSendParams(WebRequest theRequest) 
    Verify that we can simulate HTTP parameters in the HTTP request.
 public  void endReadServletOutputStream(WebResponse theResponse) throws IOException 
    Verify that we can assert the servlet output stream.
 public  void endReceiveCookie(WebResponse theResponse) throws Exception 
    Test that it is possible to send back a Cookie and verify it on the client side.
 public  void endReceiveHeader(WebResponse theResponse) 
    Verify that it is possible to send back a header and verify it on the client side.
 public  void endRequestDispatcherForward(WebResponse theResponse) throws IOException 
    Verify that we can use a RequestDispatcher in the class to test to forward to another page and compare the result sent to the output stream on the client side.
 public  void endRequestDispatcherInclude(WebResponse theResponse) throws IOException 
    Verify that we can use a RequestDispatcher in the class to test to include another page and compare the result sent to the output stream on the client side.
 public  void testGetMethod() 
    Verify that we can simulate a GET request to a servlet. Note: Cactus does a GET by default.
 public  void testPostMethod() 
    Verify that we can simulate a POST request to a servlet. Note that we send a parameter to force a POST. Otherwise Cactus will do a GET by default.
 public  void testReadServletOutputStream() throws IOException 
    Verify that we can assert the servlet output stream.
 public  void testReceiveCookie() 
    Test that it is possible to send back a Cookie and verify it on the client side.
 public  void testReceiveHeader() 
    Verify that it is possible to send back a header and verify it on the client side.
 public  void testRequestDispatcherForward() throws Exception 
    Verify that we can use a RequestDispatcher in the class to test to forward to another page and compare the result sent to the output stream on the client side.
 public  void testRequestDispatcherInclude() throws Exception 
    Verify that we can use a RequestDispatcher in the class to test to include another page and compare the result sent to the output stream on the client side.
 public  void testSendCookie() 
    Verify that we can simulate a single cookie sent in the HTTP request.
 public  void testSendHeader() 
    Verify that we can simulate HTTP headers in the HTTP request.
 public  void testSendMultipleCookies() 
    Verify that we can simulate multiple cookies sent in the HTTP request.
 public  void testSendParams() 
    Verify that we can send several parameters in the HTTP request.
 public  void testSetAttribute() 
    Verify that by default the session implicit object is available and can be used.
 public  void testSetRequestAttribute() 
    Verify that we can set an attribute in the request.