com.atlassian.jira.junit.rules
Class MockHttp<R extends javax.servlet.http.HttpServletRequest,S extends javax.servlet.http.HttpServletResponse>
java.lang.Object
org.junit.rules.TestWatcher
com.atlassian.jira.junit.rules.MockHttp<R,S>
- All Implemented Interfaces:
- org.junit.rules.TestRule
- Direct Known Subclasses:
- MockHttp.DefaultMocks, MockHttp.MockitoMocks
public class MockHttp<R extends javax.servlet.http.HttpServletRequest,S extends javax.servlet.http.HttpServletResponse>
- extends org.junit.rules.TestWatcher
Sets up and tears down automatically the following, static methods used in the JIRA production code for
accessing current HTTP objects:
- Since:
- 6.0
Methods inherited from class org.junit.rules.TestWatcher |
apply, failed, succeeded |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
withMocks
public static <RR extends javax.servlet.http.HttpServletRequest,RS extends javax.servlet.http.HttpServletResponse> MockHttp<RR,RS> withMocks(RR mockRequest,
RS mockResponse)
withDefaultMocks
public static MockHttp.DefaultMocks withDefaultMocks()
withMockitoMocks
public static MockHttp.MockitoMocks withMockitoMocks()
starting
protected void starting(org.junit.runner.Description description)
- Overrides:
starting
in class org.junit.rules.TestWatcher
finished
protected void finished(org.junit.runner.Description description)
- Overrides:
finished
in class org.junit.rules.TestWatcher
mockRequest
public R mockRequest()
mockResponse
public S mockResponse()
Copyright © 2002-2014 Atlassian. All Rights Reserved.