com.mockobjects.servlet

## Class MockServletContext

- java.lang.Object
- - com.mockobjects.MockObject
  - - com.mockobjects.servlet.MockServletContext

- All Implemented Interfaces:
    Verifiable

      public class MockServletContext
      extends MockObject

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MockServletContext()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addExpectedAttribute(java.lang.String key, java.lang.Object value)`
    `void` | `addRealPath(java.lang.String realPath)`
    `java.lang.Object` | `getAttribute(java.lang.String string)`
    `java.util.Enumeration` | `getAttributeNames()`
    `ServletContext` | `getContext(java.lang.String string)`
    `java.lang.String` | `getInitParameter(java.lang.String paramName)`
    `java.util.Enumeration` | `getInitParameterNames()`
    `int` | `getMajorVersion()`
    `java.lang.String` | `getMimeType(java.lang.String string)`
    `int` | `getMinorVersion()`
    `RequestDispatcher` | `getNamedDispatcher(java.lang.String string)`
    `java.lang.String` | `getRealPath(java.lang.String string)`
    `RequestDispatcher` | `getRequestDispatcher(java.lang.String uri)`
    `java.net.URL` | `getResource(java.lang.String string)`
    `java.io.InputStream` | `getResourceAsStream(java.lang.String string)`
    `java.util.Set` | `getResourcePaths()`
    `java.util.Set` | `getResourcePaths(java.lang.String string)`
    `java.lang.String` | `getServerInfo()`
    `Servlet` | `getServlet(java.lang.String string)`
    `java.lang.String` | `getServletContextName()`
    `java.util.Enumeration` | `getServletNames()`
    `java.util.Enumeration` | `getServlets()`
    `void` | `log(java.lang.Exception exception, java.lang.String string)`
    `void` | `log(java.lang.String string)`
    `void` | `log(java.lang.String string, java.lang.Throwable t)`
    `void` | `removeAttribute(java.lang.String string)`
    `void` | `setAttribute(java.lang.String key, java.lang.Object value)`
    `void` | `setExpectedLog(java.lang.String string)`
    `void` | `setExpectedLogThrowable(java.lang.Throwable throwable)`
    `void` | `setExpectedRequestDispatcherURI(java.lang.String uri)`
    `void` | `setInitParameter(java.lang.String paramName, java.lang.String paramValue)`
    `void` | `setupGetAttribute(java.lang.String string, java.lang.Object object)`
    `void` | `setupGetRequestDispatcher(RequestDispatcher requestDispatcher)`
    `void` | `setupGetResource(java.net.URL resource)`
    `void` | `setupGetResourcePaths(java.util.Set resourcePaths)`

    - ### Methods inherited from class com.mockobjects.MockObject

      `notImplemented, notYetImplemented, verify`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MockServletContext

          public MockServletContext()

  - ### Method Detail

    - #### getServlets

          public java.util.Enumeration getServlets()

    - #### log

          public void log(java.lang.String string)

    - #### setExpectedLog

          public void setExpectedLog(java.lang.String string)

    - #### setupGetResource

          public void setupGetResource(java.net.URL resource)

    - #### getResource

          public java.net.URL getResource(java.lang.String string)

    - #### setupGetResourcePaths

          public void setupGetResourcePaths(java.util.Set resourcePaths)

    - #### getResourcePaths

          public java.util.Set getResourcePaths(java.lang.String string)

    - #### getContext

          public ServletContext getContext(java.lang.String string)

    - #### getMinorVersion

          public int getMinorVersion()

    - #### removeAttribute

          public void removeAttribute(java.lang.String string)

    - #### log

          public void log(java.lang.String string,
                          java.lang.Throwable t)

    - #### setExpectedLogThrowable

          public void setExpectedLogThrowable(java.lang.Throwable throwable)

    - #### addRealPath

          public void addRealPath(java.lang.String realPath)

    - #### getRealPath

          public java.lang.String getRealPath(java.lang.String string)

    - #### getServletNames

          public java.util.Enumeration getServletNames()

    - #### getServlet

          public Servlet getServlet(java.lang.String string)

    - #### log

          public void log(java.lang.Exception exception,
                          java.lang.String string)

    - #### getServerInfo

          public java.lang.String getServerInfo()

    - #### setExpectedRequestDispatcherURI

          public void setExpectedRequestDispatcherURI(java.lang.String uri)

    - #### setupGetRequestDispatcher

          public void setupGetRequestDispatcher(RequestDispatcher requestDispatcher)

    - #### getRequestDispatcher

          public RequestDispatcher getRequestDispatcher(java.lang.String uri)

    - #### getMajorVersion

          public int getMajorVersion()

    - #### getResourcePaths

          public java.util.Set getResourcePaths()

    - #### setupGetAttribute

          public void setupGetAttribute(java.lang.String string,
                                        java.lang.Object object)

    - #### getMimeType

          public java.lang.String getMimeType(java.lang.String string)

    - #### getNamedDispatcher

          public RequestDispatcher getNamedDispatcher(java.lang.String string)

    - #### getInitParameter

          public java.lang.String getInitParameter(java.lang.String paramName)

    - #### setInitParameter

          public void setInitParameter(java.lang.String paramName,
                                       java.lang.String paramValue)

    - #### getAttribute

          public java.lang.Object getAttribute(java.lang.String string)

    - #### getAttributeNames

          public java.util.Enumeration getAttributeNames()

    - #### getServletContextName

          public java.lang.String getServletContextName()

    - #### getResourceAsStream

          public java.io.InputStream getResourceAsStream(java.lang.String string)

    - #### getInitParameterNames

          public java.util.Enumeration getInitParameterNames()

    - #### addExpectedAttribute

          public void addExpectedAttribute(java.lang.String key,
                                           java.lang.Object value)

    - #### setAttribute

          public void setAttribute(java.lang.String key,
                                   java.lang.Object value)

Copyright © 2002 Mock Objects. All Rights Reserved.