org.springframework.mock.web
Class MockServletConfig
java.lang.Object
org.springframework.mock.web.MockServletConfig
- All Implemented Interfaces:
- javax.servlet.ServletConfig
- public class MockServletConfig
- extends java.lang.Object
- implements javax.servlet.ServletConfig
Mock implementation of the ServletConfig interface.
Used for testing the web framework; typically not
necessary for testing application controllers.
- Author:
- Rod Johnson, Juergen Hoeller
Constructor Summary |
MockServletConfig(javax.servlet.ServletContext servletContext)
Create new MockServletConfig with empty String as name. |
MockServletConfig(javax.servlet.ServletContext servletContext,
java.lang.String name)
Create new MockServletConfig. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MockServletConfig
public MockServletConfig(javax.servlet.ServletContext servletContext)
- Create new MockServletConfig with empty String as name.
- Parameters:
servletContext
- the ServletContext that the servlet runs in
MockServletConfig
public MockServletConfig(javax.servlet.ServletContext servletContext,
java.lang.String name)
- Create new MockServletConfig.
- Parameters:
servletContext
- the ServletContext that the servlet runs inname
- the name of the servlet
addInitParameter
public void addInitParameter(java.lang.String name,
java.lang.String value)
getInitParameter
public java.lang.String getInitParameter(java.lang.String name)
- Specified by:
getInitParameter
in interface javax.servlet.ServletConfig
getInitParameterNames
public java.util.Enumeration getInitParameterNames()
- Specified by:
getInitParameterNames
in interface javax.servlet.ServletConfig
getServletContext
public javax.servlet.ServletContext getServletContext()
- Specified by:
getServletContext
in interface javax.servlet.ServletConfig
getServletName
public java.lang.String getServletName()
- Specified by:
getServletName
in interface javax.servlet.ServletConfig
Copyright (C) 2003-2004 The Spring Framework Project.