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