com.mockobjects.helpers
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:
MockHttpServletRequest.setSession(HttpSession)
,
MockServletContext.setupGetRequestDispatcher(RequestDispatcher)
Method Summary |
void |
testDoGet()
|
void |
testDoPost()
|
void |
testServlet()
Calls HttpServlet.service passing it the MockHttpServletRequest & MockHttpServletResponse |
void |
testServletInit()
Calls HttpServlet.init passing it the MockServletConfig |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServletTestHelper
public ServletTestHelper(HttpServlet testSubject)
testServletInit
public void testServletInit()
throws ServletException
- Calls HttpServlet.init passing it the MockServletConfig
- Throws:
ServletException
testServlet
public void testServlet()
throws ServletException,
java.io.IOException
- Calls HttpServlet.service passing it the MockHttpServletRequest & MockHttpServletResponse
- Throws:
ServletException
java.io.IOException
testDoPost
public void testDoPost()
throws ServletException,
java.io.IOException
- Throws:
ServletException
java.io.IOException
testDoGet
public void testDoGet()
throws ServletException,
java.io.IOException
- Throws:
ServletException
java.io.IOException
Copyright © 2002 Mock Objects. All Rights Reserved.