com.mockobjects.servlet

Class MockHttpServletRequest

Implemented Interfaces:
HttpServletRequest, Verifiable

public class MockHttpServletRequest
extends MockObject
implements HttpServletRequest

Version:
$Revision: 1.16 $

Method Summary

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

Methods inherited from class com.mockobjects.MockObject

notImplemented, notYetImplemented, verify

Method Details

addExpectedGetAttributeName

public void addExpectedGetAttributeName(String anAttributeName)

addExpectedSetAttribute

public void addExpectedSetAttribute(String attributeName,
                                    Object attributeValue)

getAttribute

public Object getAttribute(String anAttributeName)

getAttributeNames

public Enumeration getAttributeNames()

getAuthType

public String getAuthType()

getCharacterEncoding

public String getCharacterEncoding()

getContentLength

public int getContentLength()

getContentType

public String getContentType()

getContextPath

public String getContextPath()

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)

getInputStream

public ServletInputStream getInputStream()
            throws IOException

getIntHeader

public int getIntHeader(String arg1)

getLocale

public Locale getLocale()

getLocales

public Enumeration getLocales()

getMethod

public String getMethod()

getParameter

public String getParameter(String paramName)

getParameterMap

public Map getParameterMap()

getParameterNames

public Enumeration getParameterNames()

getParameterValues

public String[] getParameterValues(String key)

getPathInfo

public String getPathInfo()

getPathTranslated

public String getPathTranslated()

getProtocol

public String getProtocol()

getQueryString

public String getQueryString()

getReader

public BufferedReader getReader()

getRealPath

public String getRealPath(String arg1)

getRemoteAddr

public String getRemoteAddr()

getRemoteHost

public String getRemoteHost()

getRemoteUser

public String getRemoteUser()

getRequestDispatcher

public RequestDispatcher getRequestDispatcher(String uri)

getRequestURI

public String getRequestURI()

getRequestURL

public StringBuffer getRequestURL()

getRequestedSessionId

public String getRequestedSessionId()

getScheme

public String getScheme()

getServerName

public String getServerName()

getServerPort

public int getServerPort()

getServletPath

public String getServletPath()

getSession

public HttpSession getSession()

getSession

public HttpSession getSession(boolean createSession)

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

removeAttribute

public void removeAttribute(String anAttributeToRemove)

setAttribute

public void setAttribute(String attributeName,
                         Object attributeValue)

setCharacterEncoding

public void setCharacterEncoding(String s)

setContentType

public void setContentType(String contentType)

setExpectedContentType

public void setExpectedContentType(String aContentType)

setExpectedCreateSession

public void setExpectedCreateSession(boolean createSession)

setExpectedRequestDispatcherURI

public void setExpectedRequestDispatcherURI(String uri)

setSession

public void setSession(HttpSession httpSession)

setupAddHeader

public void setupAddHeader(String headerName,
                           String value)

setupAddParameter

public void setupAddParameter(String paramName,
                              String value)

setupAddParameter

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

setupGetAttribute

public void setupGetAttribute(Object anAttributeToReturn)

setupGetAttrubuteNames

public void setupGetAttrubuteNames(Enumeration attributeNames)

setupGetContentType

public void setupGetContentType(String aContentType)

setupGetContextPath

public void setupGetContextPath(String contextPath)

setupGetInputStream

public void setupGetInputStream(ServletInputStream inputStream)

setupGetMethod

public void setupGetMethod(String aMethod)

setupGetParameterMap

public void setupGetParameterMap(Map map)

setupGetParameterNames

public void setupGetParameterNames(Enumeration names)

setupGetProtocol

public void setupGetProtocol(String protocol)

setupGetReader

public void setupGetReader(BufferedReader reader)
            throws IOException

setupGetRemoteAddr

public void setupGetRemoteAddr(String remoteAddress)

setupGetRequestDispatcher

public void setupGetRequestDispatcher(RequestDispatcher requestDispatcher)

setupGetRequestURI

public void setupGetRequestURI(String aRequestURI)

setupGetServletPath

public void setupGetServletPath(String path)

setupGetUserPrincipal

public void setupGetUserPrincipal(Principal userPrincipal)

setupPathInfo

public void setupPathInfo(String pathInfo)

setupQueryString

public void setupQueryString(String aQueryString)

setupRemoveAttribute

public void setupRemoveAttribute(String anAttributeToRemove)

setupScheme

public void setupScheme(String aScheme)

setupServerName

public void setupServerName(String aServerName)

Copyright © 2002 Mock Objects. All Rights Reserved.