com.mockobjects.servlet

Class MockServletContext

public class MockServletContext extends MockObject implements ServletContext

Method Summary
voidaddExpectedAttribute(String key, Object value)
voidaddRealPath(String realPath)
ObjectgetAttribute(String string)
EnumerationgetAttributeNames()
ServletContextgetContext(String string)
StringgetInitParameter(String paramName)
EnumerationgetInitParameterNames()
intgetMajorVersion()
StringgetMimeType(String string)
intgetMinorVersion()
RequestDispatchergetNamedDispatcher(String string)
StringgetRealPath(String string)
RequestDispatchergetRequestDispatcher(String uri)
URLgetResource(String string)
InputStreamgetResourceAsStream(String string)
SetgetResourcePaths(String string)
SetgetResourcePaths()
StringgetServerInfo()
ServletgetServlet(String string)
StringgetServletContextName()
EnumerationgetServletNames()
EnumerationgetServlets()
voidlog(String string)
voidlog(String string, Throwable t)
voidlog(Exception exception, String string)
voidremoveAttribute(String string)
voidsetAttribute(String key, Object value)
voidsetExpectedLog(String string)
voidsetExpectedLogThrowable(Throwable throwable)
voidsetExpectedRequestDispatcherURI(String uri)
voidsetInitParameter(String paramName, String paramValue)
voidsetupGetAttribute(String string, Object object)
voidsetupGetRequestDispatcher(RequestDispatcher requestDispatcher)
voidsetupGetResource(URL resource)
voidsetupGetResourcePaths(Set resourcePaths)

Method Detail

addExpectedAttribute

public void addExpectedAttribute(String key, Object value)

addRealPath

public void addRealPath(String realPath)

getAttribute

public Object getAttribute(String string)

getAttributeNames

public Enumeration getAttributeNames()

getContext

public ServletContext getContext(String string)

getInitParameter

public String getInitParameter(String paramName)

getInitParameterNames

public Enumeration getInitParameterNames()

getMajorVersion

public int getMajorVersion()

getMimeType

public String getMimeType(String string)

getMinorVersion

public int getMinorVersion()

getNamedDispatcher

public RequestDispatcher getNamedDispatcher(String string)

getRealPath

public String getRealPath(String string)

getRequestDispatcher

public RequestDispatcher getRequestDispatcher(String uri)

getResource

public URL getResource(String string)

getResourceAsStream

public InputStream getResourceAsStream(String string)

getResourcePaths

public Set getResourcePaths(String string)

getResourcePaths

public Set getResourcePaths()

getServerInfo

public String getServerInfo()

getServlet

public Servlet getServlet(String string)

getServletContextName

public String getServletContextName()

getServletNames

public Enumeration getServletNames()

getServlets

public Enumeration getServlets()

log

public void log(String string)

log

public void log(String string, Throwable t)

log

public void log(Exception exception, String string)

removeAttribute

public void removeAttribute(String string)

setAttribute

public void setAttribute(String key, Object value)

setExpectedLog

public void setExpectedLog(String string)

setExpectedLogThrowable

public void setExpectedLogThrowable(Throwable throwable)

setExpectedRequestDispatcherURI

public void setExpectedRequestDispatcherURI(String uri)

setInitParameter

public void setInitParameter(String paramName, String paramValue)

setupGetAttribute

public void setupGetAttribute(String string, Object object)

setupGetRequestDispatcher

public void setupGetRequestDispatcher(RequestDispatcher requestDispatcher)

setupGetResource

public void setupGetResource(URL resource)

setupGetResourcePaths

public void setupGetResourcePaths(Set resourcePaths)
Copyright © 2002 Mock Objects. All Rights Reserved.