Package org.springframework.mock.web
Class MockFilterConfig
java.lang.Object
org.springframework.mock.web.MockFilterConfig
- All Implemented Interfaces:
FilterConfig
Mock implementation of the
FilterConfig
interface.
Used for testing the web framework; also useful for testing
custom Filter
implementations.
- Since:
- 1.0.2
- Author:
- Juergen Hoeller
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new MockFilterConfig with a defaultMockServletContext
.MockFilterConfig
(ServletContext servletContext) Create a new MockFilterConfig.MockFilterConfig
(ServletContext servletContext, String filterName) Create a new MockFilterConfig.MockFilterConfig
(String filterName) Create a new MockFilterConfig with a defaultMockServletContext
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addInitParameter
(String name, String value) getInitParameter
(String name)
-
Constructor Details
-
MockFilterConfig
public MockFilterConfig()Create a new MockFilterConfig with a defaultMockServletContext
. -
MockFilterConfig
Create a new MockFilterConfig with a defaultMockServletContext
.- Parameters:
filterName
- the name of the filter
-
MockFilterConfig
Create a new MockFilterConfig.- Parameters:
servletContext
- the ServletContext that the servlet runs in
-
MockFilterConfig
Create a new MockFilterConfig.- Parameters:
servletContext
- the ServletContext that the servlet runs infilterName
- the name of the filter
-
-
Method Details
-
getFilterName
- Specified by:
getFilterName
in interfaceFilterConfig
-
getServletContext
- Specified by:
getServletContext
in interfaceFilterConfig
-
addInitParameter
-
getInitParameter
- Specified by:
getInitParameter
in interfaceFilterConfig
-
getInitParameterNames
- Specified by:
getInitParameterNames
in interfaceFilterConfig
-