|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.mock.web.MockServletConfig
public class MockServletConfig
Mock implementation of the ServletConfig
interface.
Used for testing the web framework; typically not necessary for testing application controllers.
Constructor Summary | |
---|---|
MockServletConfig()
Create a new MockServletConfig with a default MockServletContext . |
|
MockServletConfig(ServletContext servletContext)
Create a new MockServletConfig. |
|
MockServletConfig(ServletContext servletContext,
String servletName)
Create a new MockServletConfig. |
|
MockServletConfig(String servletName)
Create a new MockServletConfig with a default MockServletContext . |
Method Summary | |
---|---|
void |
addInitParameter(String name,
String value)
|
String |
getInitParameter(String name)
|
Enumeration |
getInitParameterNames()
|
ServletContext |
getServletContext()
|
String |
getServletName()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MockServletConfig()
MockServletContext
.
public MockServletConfig(String servletName)
MockServletContext
.
servletName
- the name of the servletpublic MockServletConfig(ServletContext servletContext)
servletContext
- the ServletContext that the servlet runs inpublic MockServletConfig(ServletContext servletContext, String servletName)
servletContext
- the ServletContext that the servlet runs inservletName
- the name of the servletMethod Detail |
---|
public String getServletName()
getServletName
in interface ServletConfig
public ServletContext getServletContext()
getServletContext
in interface ServletConfig
public void addInitParameter(String name, String value)
public String getInitParameter(String name)
getInitParameter
in interface ServletConfig
public Enumeration getInitParameterNames()
getInitParameterNames
in interface ServletConfig
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |