Package org.apache.struts.mock
Class MockServletConfig
java.lang.Object
org.apache.struts.mock.MockServletConfig
- All Implemented Interfaces:
ServletConfig
Mock ServletConfig 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 the minimal set of methods needed to
create unit tests is 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-07 12:11:38 -0400 (Sat, 07 May 2005) $
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addInitParameter
(String name, String value) getInitParameter
(String name) void
setServletContext
(ServletContext context)
-
Field Details
-
context
-
parameters
-
-
Constructor Details
-
MockServletConfig
public MockServletConfig() -
MockServletConfig
-
-
Method Details
-
addInitParameter
-
setServletContext
-
getInitParameter
- Specified by:
getInitParameter
in interfaceServletConfig
-
getInitParameterNames
- Specified by:
getInitParameterNames
in interfaceServletConfig
-
getServletContext
- Specified by:
getServletContext
in interfaceServletConfig
-
getServletName
- Specified by:
getServletName
in interfaceServletConfig
-