Package com.mockobjects.helpers
Class ServletTestHelper
java.lang.Object
com.mockobjects.helpers.AbstractServletTestHelper
com.mockobjects.helpers.ServletTestHelper
Sets up mock servlet objects in a common configuration.
HttpSession is attached to request, RequestDispatcher is connected to HttpSession
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
Calls HttpServlet.service passing it the MockHttpServletRequest invalid input: '&' MockHttpServletResponsevoid
Calls HttpServlet.init passing it the MockServletConfigMethods inherited from class com.mockobjects.helpers.AbstractServletTestHelper
getHttpSession, getRequest, getRequestDispatcher, getResponse, getServletConfig, getServletContext
-
Constructor Details
-
ServletTestHelper
public ServletTestHelper(HttpServlet testSubject)
-
-
Method Details
-
testServletInit
public void testServletInit() throws ServletExceptionCalls HttpServlet.init passing it the MockServletConfig- Throws:
ServletException
-
testServlet
Calls HttpServlet.service passing it the MockHttpServletRequest invalid input: '&' MockHttpServletResponse- Throws:
ServletException
IOException
-
testDoPost
- Throws:
ServletException
IOException
-
testDoGet
- Throws:
ServletException
IOException
-