Class MockActionServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.apache.struts.action.ActionServlet
org.apache.struts.mock.MockActionServlet
All Implemented Interfaces:
Servlet, ServletConfig, Serializable

public class MockActionServlet extends org.apache.struts.action.ActionServlet

Mock ActionServlet object for low-level unit tests of Struts controller components. Coarser grained tests should be implemented in terms of the Cactus framework, instead of the mock object classes.

WARNING - Only getter methods for servletContext and servletConfig are provided, plus additional methods to configure this object as necessary. Methods for unsupported operations will throw UnsupportedOperationException.

WARNING - Because unit tests operate in a single threaded environment, no synchronization is performed.

Version:
$Rev$ $Date: 2005-05-14 02:09:06 -0400 (Sat, 14 May 2005) $
See Also:
  • Field Details

  • Constructor Details

    • MockActionServlet

      public MockActionServlet(ServletContext servletContext, ServletConfig servletConfig)
      Constructor.
      Parameters:
      servletContext - the ServletContext
      servletConfig - the ServletConfig
    • MockActionServlet

      public MockActionServlet()
      Constructor.
  • Method Details