public class MockHttpExtension<R extends javax.servlet.http.HttpServletRequest,S extends javax.servlet.http.HttpServletResponse> extends Object implements org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.BeforeEachCallback
ActionContext
ExecutingHttpRequest
Modifier and Type | Class and Description |
---|---|
static class |
MockHttpExtension.DefaultMocks |
static class |
MockHttpExtension.MockitoMocks |
Modifier | Constructor and Description |
---|---|
protected |
MockHttpExtension(R mockRequest,
S mockResponse) |
Modifier and Type | Method and Description |
---|---|
void |
afterEach(org.junit.jupiter.api.extension.ExtensionContext context) |
void |
beforeEach(org.junit.jupiter.api.extension.ExtensionContext context) |
R |
mockRequest() |
S |
mockResponse() |
static MockHttpExtension.DefaultMocks |
withDefaultMocks() |
static MockHttpExtension.MockitoMocks |
withMockitoMocks() |
static <RR extends javax.servlet.http.HttpServletRequest,RS extends javax.servlet.http.HttpServletResponse> |
withMocks(RR mockRequest,
RS mockResponse) |
public static <RR extends javax.servlet.http.HttpServletRequest,RS extends javax.servlet.http.HttpServletResponse> MockHttpExtension<RR,RS> withMocks(RR mockRequest, RS mockResponse)
public static MockHttpExtension.DefaultMocks withDefaultMocks()
public static MockHttpExtension.MockitoMocks withMockitoMocks()
public void beforeEach(org.junit.jupiter.api.extension.ExtensionContext context) throws Exception
beforeEach
in interface org.junit.jupiter.api.extension.BeforeEachCallback
Exception
public void afterEach(org.junit.jupiter.api.extension.ExtensionContext context) throws Exception
afterEach
in interface org.junit.jupiter.api.extension.AfterEachCallback
Exception
public R mockRequest()
public S mockResponse()
Copyright © 2002-2021 Atlassian. All Rights Reserved.