Search in sources :

Example 21 with ServletResponse

use of jakarta.servlet.ServletResponse in project spring-framework by spring-projects.

the class ServletResponseMethodArgumentResolverTests method setup.

@BeforeEach
public void setup() throws Exception {
    resolver = new ServletResponseMethodArgumentResolver();
    mavContainer = new ModelAndViewContainer();
    servletResponse = new MockHttpServletResponse();
    webRequest = new ServletWebRequest(new MockHttpServletRequest(), servletResponse);
    method = getClass().getMethod("supportedParams", ServletResponse.class, OutputStream.class, Writer.class);
}
Also used : MockHttpServletResponse(org.springframework.web.testfixture.servlet.MockHttpServletResponse) ServletResponse(jakarta.servlet.ServletResponse) ModelAndViewContainer(org.springframework.web.method.support.ModelAndViewContainer) MockHttpServletRequest(org.springframework.web.testfixture.servlet.MockHttpServletRequest) OutputStream(java.io.OutputStream) ServletWebRequest(org.springframework.web.context.request.ServletWebRequest) MockHttpServletResponse(org.springframework.web.testfixture.servlet.MockHttpServletResponse) Writer(java.io.Writer) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

ServletResponse (jakarta.servlet.ServletResponse)21 HttpServletResponse (jakarta.servlet.http.HttpServletResponse)17 ServletRequest (jakarta.servlet.ServletRequest)13 HttpServletRequest (jakarta.servlet.http.HttpServletRequest)10 ServletException (jakarta.servlet.ServletException)9 IOException (java.io.IOException)8 Test (org.junit.jupiter.api.Test)5 ServletResponseWrapper (jakarta.servlet.ServletResponseWrapper)4 MockFilterChain (org.springframework.mock.web.MockFilterChain)4 MockHttpServletRequest (org.springframework.mock.web.MockHttpServletRequest)4 MockHttpServletResponse (org.springframework.mock.web.MockHttpServletResponse)4 MockHttpServletRequest (org.springframework.web.testfixture.servlet.MockHttpServletRequest)4 MockHttpServletResponse (org.springframework.web.testfixture.servlet.MockHttpServletResponse)4 Response (org.apache.catalina.connector.Response)3 AsyncEvent (jakarta.servlet.AsyncEvent)2 ServletOutputStream (jakarta.servlet.ServletOutputStream)2 HashMap (java.util.HashMap)2 Properties (java.util.Properties)2 Context (org.apache.catalina.Context)2 ResponseFacade (org.apache.catalina.connector.ResponseFacade)2