Class ServletTestHelper

java.lang.Object
com.mockobjects.helpers.AbstractServletTestHelper
com.mockobjects.helpers.ServletTestHelper

public class ServletTestHelper extends AbstractServletTestHelper
Sets up mock servlet objects in a common configuration. HttpSession is attached to request, RequestDispatcher is connected to HttpSession
See Also:
  • Constructor Details

    • ServletTestHelper

      public ServletTestHelper(HttpServlet testSubject)
  • Method Details

    • testServletInit

      public void testServletInit() throws ServletException
      Calls HttpServlet.init passing it the MockServletConfig
      Throws:
      ServletException
    • testServlet

      public void testServlet() throws ServletException, IOException
      Calls HttpServlet.service passing it the MockHttpServletRequest invalid input: '&' MockHttpServletResponse
      Throws:
      ServletException
      IOException
    • testDoPost

      public void testDoPost() throws ServletException, IOException
      Throws:
      ServletException
      IOException
    • testDoGet

      public void testDoGet() throws ServletException, IOException
      Throws:
      ServletException
      IOException