com.mockobjects.servlet
Class MockHttpServletRequest

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

public class MockHttpServletRequest
extends MockObject

Version:
$Revision: 1.16 $

Constructor Summary
MockHttpServletRequest()
           
 
Method Summary
 void addExpectedGetAttributeName(java.lang.String anAttributeName)
           
 void addExpectedSetAttribute(java.lang.String attributeName, java.lang.Object attributeValue)
           
 java.lang.Object getAttribute(java.lang.String anAttributeName)
           
 java.util.Enumeration getAttributeNames()
           
 java.lang.String getAuthType()
           
 java.lang.String getCharacterEncoding()
           
 int getContentLength()
           
 java.lang.String getContentType()
           
 java.lang.String getContextPath()
           
 Cookie[] getCookies()
           
 long getDateHeader(java.lang.String arg1)
           
 java.lang.String getHeader(java.lang.String key)
           
 java.util.Enumeration getHeaderNames()
           
 java.util.Enumeration getHeaders(java.lang.String arg1)
           
 ServletInputStream getInputStream()
           
 int getIntHeader(java.lang.String arg1)
           
 java.util.Locale getLocale()
           
 java.util.Enumeration getLocales()
           
 java.lang.String getMethod()
           
 java.lang.String getParameter(java.lang.String paramName)
           
 java.util.Map getParameterMap()
           
 java.util.Enumeration getParameterNames()
           
 java.lang.String[] getParameterValues(java.lang.String key)
           
 java.lang.String getPathInfo()
           
 java.lang.String getPathTranslated()
           
 java.lang.String getProtocol()
           
 java.lang.String getQueryString()
           
 java.io.BufferedReader getReader()
           
 java.lang.String getRealPath(java.lang.String arg1)
           
 java.lang.String getRemoteAddr()
           
 java.lang.String getRemoteHost()
           
 java.lang.String getRemoteUser()
           
 RequestDispatcher getRequestDispatcher(java.lang.String uri)
           
 java.lang.String getRequestedSessionId()
           
 java.lang.String getRequestURI()
           
 java.lang.StringBuffer getRequestURL()
           
 java.lang.String getScheme()
           
 java.lang.String getServerName()
           
 int getServerPort()
           
 java.lang.String getServletPath()
           
 HttpSession getSession()
           
 HttpSession getSession(boolean createSession)
           
 java.security.Principal getUserPrincipal()
           
 boolean isRequestedSessionIdFromCookie()
           
 boolean isRequestedSessionIdFromUrl()
           
 boolean isRequestedSessionIdFromURL()
           
 boolean isRequestedSessionIdValid()
           
 boolean isSecure()
           
 boolean isUserInRole(java.lang.String arg1)
           
 void removeAttribute(java.lang.String anAttributeToRemove)
           
 void setAttribute(java.lang.String attributeName, java.lang.Object attributeValue)
           
 void setCharacterEncoding(java.lang.String s)
           
 void setContentType(java.lang.String contentType)
           
 void setExpectedContentType(java.lang.String aContentType)
           
 void setExpectedCreateSession(boolean createSession)
           
 void setExpectedRequestDispatcherURI(java.lang.String uri)
           
 void setSession(HttpSession httpSession)
           
 void setupAddHeader(java.lang.String headerName, java.lang.String value)
           
 void setupAddParameter(java.lang.String paramName, java.lang.String value)
           
 void setupAddParameter(java.lang.String paramName, java.lang.String[] values)
           
 void setupGetAttribute(java.lang.Object anAttributeToReturn)
           
 void setupGetAttrubuteNames(java.util.Enumeration attributeNames)
           
 void setupGetContentType(java.lang.String aContentType)
           
 void setupGetContextPath(java.lang.String contextPath)
           
 void setupGetInputStream(ServletInputStream inputStream)
           
 void setupGetMethod(java.lang.String aMethod)
           
 void setupGetParameterMap(java.util.Map map)
           
 void setupGetParameterNames(java.util.Enumeration names)
           
 void setupGetProtocol(java.lang.String protocol)
           
 void setupGetReader(java.io.BufferedReader reader)
           
 void setupGetRemoteAddr(java.lang.String remoteAddress)
           
 void setupGetRequestDispatcher(RequestDispatcher requestDispatcher)
           
 void setupGetRequestURI(java.lang.String aRequestURI)
           
 void setupGetServletPath(java.lang.String path)
           
 void setupGetUserPrincipal(java.security.Principal userPrincipal)
           
 void setupPathInfo(java.lang.String pathInfo)
           
 void setupQueryString(java.lang.String aQueryString)
           
 void setupRemoveAttribute(java.lang.String anAttributeToRemove)
           
 void setupScheme(java.lang.String aScheme)
           
 void setupServerName(java.lang.String aServerName)
           
 
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

MockHttpServletRequest

public MockHttpServletRequest()
Method Detail

setupGetAttribute

public void setupGetAttribute(java.lang.Object anAttributeToReturn)

addExpectedGetAttributeName

public void addExpectedGetAttributeName(java.lang.String anAttributeName)

getAttribute

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

setupGetAttrubuteNames

public void setupGetAttrubuteNames(java.util.Enumeration attributeNames)

getAttributeNames

public java.util.Enumeration getAttributeNames()

getAuthType

public java.lang.String getAuthType()

getCharacterEncoding

public java.lang.String getCharacterEncoding()

getContentLength

public int getContentLength()

getContentType

public java.lang.String getContentType()

setupGetContentType

public void setupGetContentType(java.lang.String aContentType)

setExpectedContentType

public void setExpectedContentType(java.lang.String aContentType)

setContentType

public void setContentType(java.lang.String contentType)

getContextPath

public java.lang.String getContextPath()

setupGetContextPath

public void setupGetContextPath(java.lang.String contextPath)

getCookies

public Cookie[] getCookies()

getDateHeader

public long getDateHeader(java.lang.String arg1)

getHeader

public java.lang.String getHeader(java.lang.String key)

getHeaderNames

public java.util.Enumeration getHeaderNames()

getHeaders

public java.util.Enumeration getHeaders(java.lang.String arg1)

setupGetInputStream

public void setupGetInputStream(ServletInputStream inputStream)

getInputStream

public ServletInputStream getInputStream()
                                  throws java.io.IOException
Throws:
java.io.IOException

getIntHeader

public int getIntHeader(java.lang.String arg1)

getLocale

public java.util.Locale getLocale()

getLocales

public java.util.Enumeration getLocales()

setupGetMethod

public void setupGetMethod(java.lang.String aMethod)

getMethod

public java.lang.String getMethod()

getParameter

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

setupGetParameterNames

public void setupGetParameterNames(java.util.Enumeration names)

getParameterNames

public java.util.Enumeration getParameterNames()

getParameterValues

public java.lang.String[] getParameterValues(java.lang.String key)

getPathInfo

public java.lang.String getPathInfo()

getPathTranslated

public java.lang.String getPathTranslated()

getProtocol

public java.lang.String getProtocol()

setupGetProtocol

public void setupGetProtocol(java.lang.String protocol)

getQueryString

public java.lang.String getQueryString()

getReader

public java.io.BufferedReader getReader()

setupGetReader

public void setupGetReader(java.io.BufferedReader reader)
                    throws java.io.IOException
Throws:
java.io.IOException

getRealPath

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

setupGetRemoteAddr

public void setupGetRemoteAddr(java.lang.String remoteAddress)

getRemoteAddr

public java.lang.String getRemoteAddr()

getRemoteHost

public java.lang.String getRemoteHost()

getRemoteUser

public java.lang.String getRemoteUser()

setupGetRequestDispatcher

public void setupGetRequestDispatcher(RequestDispatcher requestDispatcher)

getRequestDispatcher

public RequestDispatcher getRequestDispatcher(java.lang.String uri)

setExpectedRequestDispatcherURI

public void setExpectedRequestDispatcherURI(java.lang.String uri)

getRequestedSessionId

public java.lang.String getRequestedSessionId()

setupGetRequestURI

public void setupGetRequestURI(java.lang.String aRequestURI)

getRequestURI

public java.lang.String getRequestURI()

getScheme

public java.lang.String getScheme()

getServerName

public java.lang.String getServerName()

getServerPort

public int getServerPort()

setupGetServletPath

public void setupGetServletPath(java.lang.String path)

getServletPath

public java.lang.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(java.security.Principal userPrincipal)

getUserPrincipal

public java.security.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(java.lang.String arg1)

setupRemoveAttribute

public void setupRemoveAttribute(java.lang.String anAttributeToRemove)

removeAttribute

public void removeAttribute(java.lang.String anAttributeToRemove)

addExpectedSetAttribute

public void addExpectedSetAttribute(java.lang.String attributeName,
                                    java.lang.Object attributeValue)

setAttribute

public void setAttribute(java.lang.String attributeName,
                         java.lang.Object attributeValue)

setupAddParameter

public void setupAddParameter(java.lang.String paramName,
                              java.lang.String[] values)

setupAddParameter

public void setupAddParameter(java.lang.String paramName,
                              java.lang.String value)

setupAddHeader

public void setupAddHeader(java.lang.String headerName,
                           java.lang.String value)

setupPathInfo

public void setupPathInfo(java.lang.String pathInfo)

setupQueryString

public void setupQueryString(java.lang.String aQueryString)

setupScheme

public void setupScheme(java.lang.String aScheme)

setupServerName

public void setupServerName(java.lang.String aServerName)

getRequestURL

public java.lang.StringBuffer getRequestURL()

setCharacterEncoding

public void setCharacterEncoding(java.lang.String s)

setupGetParameterMap

public void setupGetParameterMap(java.util.Map map)

getParameterMap

public java.util.Map getParameterMap()


Copyright © 2002 Mock Objects. All Rights Reserved.