@CompileStatic class GrailsWebMockUtil extends Object
Constructor and description |
---|
GrailsWebMockUtil() |
Type Params | Return Type | Name and description |
---|---|---|
|
static GrailsWebRequest |
bindMockWebRequest(WebApplicationContext ctx) Binds a Mock implementation of a GrailsWebRequest object to the current thread. |
|
static GrailsWebRequest |
bindMockWebRequest(ApplicationContext ctx, MockHttpServletRequest request, MockHttpServletResponse response) Binds a Mock implementation of a GrailsWebRequest object to the current thread. |
|
static GrailsWebRequest |
bindMockWebRequest() Binds a Mock implementation of a GrailsWebRequest object to the current thread. |
|
static GrailsWebRequest |
bindMockWebRequest(ServletContext servletContext, MockHttpServletRequest request, MockHttpServletResponse response) |
Binds a Mock implementation of a GrailsWebRequest object to the current thread. The mock version uses instances of the Spring MockHttpServletRequest, MockHttpServletResponse and MockServletContext classes.
ctx
- The WebApplicationContext to useBinds a Mock implementation of a GrailsWebRequest object to the current thread. The mock version uses instances of the Spring MockHttpServletRequest, MockHttpServletResponse and MockServletContext classes.
ctx
- The WebApplicationContext to userequest
- The requestresponse
- The responseBinds a Mock implementation of a GrailsWebRequest object to the current thread. The mock version uses instances of the Spring MockHttpServletRequest, MockHttpServletResponse and MockServletContext classes.