Package com.mockobjects.servlet
Class MockHttpServletRequest
java.lang.Object
com.mockobjects.MockObject
com.mockobjects.servlet.MockHttpServletRequest
- All Implemented Interfaces:
Verifiable
- Version:
- $Revision: 1.16 $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExpectedGetAttributeName(String anAttributeName) voidaddExpectedSetAttribute(String attributeName, Object attributeValue) getAttribute(String anAttributeName) intCookie[]longgetDateHeader(String arg1) getHeaders(String arg1) ServletInputStreamintgetIntHeader(String arg1) getParameter(String paramName) String[]getParameterValues(String key) getRealPath(String arg1) RequestDispatcherintHttpSessionHttpSessiongetSession(boolean createSession) booleanbooleanbooleanbooleanbooleanisSecure()booleanisUserInRole(String arg1) voidremoveAttribute(String anAttributeToRemove) voidsetAttribute(String attributeName, Object attributeValue) voidvoidsetContentType(String contentType) voidsetExpectedContentType(String aContentType) voidsetExpectedCreateSession(boolean createSession) voidvoidsetSession(HttpSession httpSession) voidsetupAddHeader(String headerName, String value) voidsetupAddParameter(String paramName, String value) voidsetupAddParameter(String paramName, String[] values) voidsetupGetAttribute(Object anAttributeToReturn) voidsetupGetAttrubuteNames(Enumeration attributeNames) voidsetupGetContentType(String aContentType) voidsetupGetContextPath(String contextPath) voidsetupGetInputStream(ServletInputStream inputStream) voidsetupGetMethod(String aMethod) voidsetupGetParameterMap(Map map) voidvoidsetupGetProtocol(String protocol) voidsetupGetReader(BufferedReader reader) voidsetupGetRemoteAddr(String remoteAddress) voidsetupGetRequestDispatcher(RequestDispatcher requestDispatcher) voidsetupGetRequestURI(String aRequestURI) voidsetupGetServletPath(String path) voidsetupGetUserPrincipal(Principal userPrincipal) voidsetupPathInfo(String pathInfo) voidsetupQueryString(String aQueryString) voidsetupRemoveAttribute(String anAttributeToRemove) voidsetupScheme(String aScheme) voidsetupServerName(String aServerName) Methods inherited from class com.mockobjects.MockObject
notImplemented, notYetImplemented, verify
-
Constructor Details
-
MockHttpServletRequest
public MockHttpServletRequest()
-
-
Method Details
-
setupGetAttribute
-
addExpectedGetAttributeName
-
getAttribute
-
setupGetAttrubuteNames
-
getAttributeNames
-
getAuthType
-
getCharacterEncoding
-
getContentLength
public int getContentLength() -
getContentType
-
setupGetContentType
-
setExpectedContentType
-
setContentType
-
getContextPath
-
setupGetContextPath
-
getCookies
public Cookie[] getCookies() -
getDateHeader
-
getHeader
-
getHeaderNames
-
getHeaders
-
setupGetInputStream
public void setupGetInputStream(ServletInputStream inputStream) -
getInputStream
- Throws:
IOException
-
getIntHeader
-
getLocale
-
getLocales
-
setupGetMethod
-
getMethod
-
getParameter
-
setupGetParameterNames
-
getParameterNames
-
getParameterValues
-
getPathInfo
-
getPathTranslated
-
getProtocol
-
setupGetProtocol
-
getQueryString
-
getReader
-
setupGetReader
- Throws:
IOException
-
getRealPath
-
setupGetRemoteAddr
-
getRemoteAddr
-
getRemoteHost
-
getRemoteUser
-
setupGetRequestDispatcher
public void setupGetRequestDispatcher(RequestDispatcher requestDispatcher) -
getRequestDispatcher
-
setExpectedRequestDispatcherURI
-
getRequestedSessionId
-
setupGetRequestURI
-
getRequestURI
-
getScheme
-
getServerName
-
getServerPort
public int getServerPort() -
setupGetServletPath
-
getServletPath
-
getSession
public HttpSession getSession() -
setSession
public void setSession(HttpSession httpSession) -
setExpectedCreateSession
public void setExpectedCreateSession(boolean createSession) -
getSession
public HttpSession getSession(boolean createSession) -
setupGetUserPrincipal
-
getUserPrincipal
-
isRequestedSessionIdFromCookie
public boolean isRequestedSessionIdFromCookie() -
isRequestedSessionIdFromUrl
public boolean isRequestedSessionIdFromUrl() -
isRequestedSessionIdFromURL
public boolean isRequestedSessionIdFromURL() -
isRequestedSessionIdValid
public boolean isRequestedSessionIdValid() -
isSecure
public boolean isSecure() -
isUserInRole
-
setupRemoveAttribute
-
removeAttribute
-
addExpectedSetAttribute
-
setAttribute
-
setupAddParameter
-
setupAddParameter
-
setupAddHeader
-
setupPathInfo
-
setupQueryString
-
setupScheme
-
setupServerName
-
getRequestURL
-
setCharacterEncoding
-
setupGetParameterMap
-
getParameterMap
-