com.mockobjects.servlet
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 $
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MockHttpServletRequest
public MockHttpServletRequest()
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.