Class MockHttpServletRequest

java.lang.Object
com.mockobjects.MockObject
com.mockobjects.servlet.MockHttpServletRequest
All Implemented Interfaces:
Verifiable

public class MockHttpServletRequest extends MockObject
Version:
$Revision: 1.16 $
  • Constructor Details

    • MockHttpServletRequest

      public MockHttpServletRequest()
  • Method Details

    • setupGetAttribute

      public void setupGetAttribute(Object anAttributeToReturn)
    • addExpectedGetAttributeName

      public void addExpectedGetAttributeName(String anAttributeName)
    • getAttribute

      public Object getAttribute(String anAttributeName)
    • setupGetAttrubuteNames

      public void setupGetAttrubuteNames(Enumeration attributeNames)
    • getAttributeNames

      public Enumeration getAttributeNames()
    • getAuthType

      public String getAuthType()
    • getCharacterEncoding

      public String getCharacterEncoding()
    • getContentLength

      public int getContentLength()
    • getContentType

      public String getContentType()
    • setupGetContentType

      public void setupGetContentType(String aContentType)
    • setExpectedContentType

      public void setExpectedContentType(String aContentType)
    • setContentType

      public void setContentType(String contentType)
    • getContextPath

      public String getContextPath()
    • setupGetContextPath

      public void setupGetContextPath(String contextPath)
    • getCookies

      public Cookie[] getCookies()
    • getDateHeader

      public long getDateHeader(String arg1)
    • getHeader

      public String getHeader(String key)
    • getHeaderNames

      public Enumeration getHeaderNames()
    • getHeaders

      public Enumeration getHeaders(String arg1)
    • setupGetInputStream

      public void setupGetInputStream(ServletInputStream inputStream)
    • getInputStream

      public ServletInputStream getInputStream() throws IOException
      Throws:
      IOException
    • getIntHeader

      public int getIntHeader(String arg1)
    • getLocale

      public Locale getLocale()
    • getLocales

      public Enumeration getLocales()
    • setupGetMethod

      public void setupGetMethod(String aMethod)
    • getMethod

      public String getMethod()
    • getParameter

      public String getParameter(String paramName)
    • setupGetParameterNames

      public void setupGetParameterNames(Enumeration names)
    • getParameterNames

      public Enumeration getParameterNames()
    • getParameterValues

      public String[] getParameterValues(String key)
    • getPathInfo

      public String getPathInfo()
    • getPathTranslated

      public String getPathTranslated()
    • getProtocol

      public String getProtocol()
    • setupGetProtocol

      public void setupGetProtocol(String protocol)
    • getQueryString

      public String getQueryString()
    • getReader

      public BufferedReader getReader()
    • setupGetReader

      public void setupGetReader(BufferedReader reader) throws IOException
      Throws:
      IOException
    • getRealPath

      public String getRealPath(String arg1)
    • setupGetRemoteAddr

      public void setupGetRemoteAddr(String remoteAddress)
    • getRemoteAddr

      public String getRemoteAddr()
    • getRemoteHost

      public String getRemoteHost()
    • getRemoteUser

      public String getRemoteUser()
    • setupGetRequestDispatcher

      public void setupGetRequestDispatcher(RequestDispatcher requestDispatcher)
    • getRequestDispatcher

      public RequestDispatcher getRequestDispatcher(String uri)
    • setExpectedRequestDispatcherURI

      public void setExpectedRequestDispatcherURI(String uri)
    • getRequestedSessionId

      public String getRequestedSessionId()
    • setupGetRequestURI

      public void setupGetRequestURI(String aRequestURI)
    • getRequestURI

      public String getRequestURI()
    • getScheme

      public String getScheme()
    • getServerName

      public String getServerName()
    • getServerPort

      public int getServerPort()
    • setupGetServletPath

      public void setupGetServletPath(String path)
    • getServletPath

      public String getServletPath()
    • getSession

      public HttpSession getSession()
    • setSession

      public void setSession(HttpSession httpSession)
    • setExpectedCreateSession

      public void setExpectedCreateSession(boolean createSession)
    • getSession

      public HttpSession getSession(boolean createSession)
    • setupGetUserPrincipal

      public void setupGetUserPrincipal(Principal userPrincipal)
    • getUserPrincipal

      public Principal getUserPrincipal()
    • isRequestedSessionIdFromCookie

      public boolean isRequestedSessionIdFromCookie()
    • isRequestedSessionIdFromUrl

      public boolean isRequestedSessionIdFromUrl()
    • isRequestedSessionIdFromURL

      public boolean isRequestedSessionIdFromURL()
    • isRequestedSessionIdValid

      public boolean isRequestedSessionIdValid()
    • isSecure

      public boolean isSecure()
    • isUserInRole

      public boolean isUserInRole(String arg1)
    • setupRemoveAttribute

      public void setupRemoveAttribute(String anAttributeToRemove)
    • removeAttribute

      public void removeAttribute(String anAttributeToRemove)
    • addExpectedSetAttribute

      public void addExpectedSetAttribute(String attributeName, Object attributeValue)
    • setAttribute

      public void setAttribute(String attributeName, Object attributeValue)
    • setupAddParameter

      public void setupAddParameter(String paramName, String[] values)
    • setupAddParameter

      public void setupAddParameter(String paramName, String value)
    • setupAddHeader

      public void setupAddHeader(String headerName, String value)
    • setupPathInfo

      public void setupPathInfo(String pathInfo)
    • setupQueryString

      public void setupQueryString(String aQueryString)
    • setupScheme

      public void setupScheme(String aScheme)
    • setupServerName

      public void setupServerName(String aServerName)
    • getRequestURL

      public StringBuffer getRequestURL()
    • setCharacterEncoding

      public void setCharacterEncoding(String s)
    • setupGetParameterMap

      public void setupGetParameterMap(Map map)
    • getParameterMap

      public Map getParameterMap()