@groovy.transform.CompileStatic class GrailsWebMockUtil extends java.lang.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) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
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.