Class MockRequest
- java.lang.Object
-
- jetbrains.buildServer.controllers.fakes.FakeHttpServletRequest
-
- jetbrains.buildServer.controllers.MockRequest
-
- All Implemented Interfaces:
javax.servlet.http.HttpServletRequest,javax.servlet.ServletRequest
- Direct Known Subclasses:
MockMultipartRequest
public class MockRequest extends FakeHttpServletRequest
- Author:
- Kir
-
-
Field Summary
Fields Modifier and Type Field Description static StringcontextPath-
Fields inherited from class jetbrains.buildServer.controllers.fakes.FakeHttpServletRequest
formats
-
-
Constructor Summary
Constructors Constructor Description MockRequest(String... parameters)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FakeHttpSessioncreateSession()voidfixCSRF()static MockRequestfromUrlWithQueryString(String urlWithQuery)MockSessiongetSessionMock()voidinvalidateCSRF()voidsetRealBrowserUserAgent()-
Methods inherited from class jetbrains.buildServer.controllers.fakes.FakeHttpServletRequest
addCookie, addParameters, addToPathInfo, authenticate, changeSessionId, clearAttributes, deleteParameter, getAsyncContext, getAttribute, getAttributeNames, getAuthType, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getContextPath, getCookies, getDateHeader, getDispatcherType, getHeader, getHeaderNames, getHeaders, getInputStream, getIntHeader, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getMethod, getParameter, getParameterMap, getParameterNames, getParameterValues, getPart, getParts, getPathInfo, getPathTranslated, getProtocol, getQueryString, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRemoteUser, getRequestDispatcher, getRequestedSessionId, getRequestURI, getRequestURL, getScheme, getServerName, getServerPort, getServletContext, getServletPath, getSession, getSession, getUserPrincipal, isAsyncStarted, isAsyncSupported, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isSecure, isUserInRole, login, logout, removeAttribute, removeHeader, setAttribute, setCharacterEncoding, setContextPath, setHeader, setHost, setInputStream, setLocalAddr, setLocalName, setLocalPort, setMethod, setParameter, setParameters, setPathInfo, setQueryString, setRemoteAddr, setRemoteHost, setRemotePort, setRequestedSessionId, setRequestURI, setRequestURI, setRequestURL, setScheme, setSecure, setServerName, setServerPort, setServletContext, setServletPath, setSession, startAsync, startAsync, updateQueryStringFromParameters, upgrade
-
-
-
-
Field Detail
-
contextPath
public static final String contextPath
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MockRequest
public MockRequest(String... parameters)
-
-
Method Detail
-
getSessionMock
public MockSession getSessionMock()
-
createSession
@NotNull protected FakeHttpSession createSession()
- Overrides:
createSessionin classFakeHttpServletRequest
-
fixCSRF
public void fixCSRF()
-
invalidateCSRF
public void invalidateCSRF()
-
setRealBrowserUserAgent
public void setRealBrowserUserAgent()
-
fromUrlWithQueryString
public static MockRequest fromUrlWithQueryString(String urlWithQuery)
-
-