class GrailsTestRequestEnvironmentInterceptor extends Object
Establishes a “mock” request environment suitable for running tests in.
Type | Name and description |
---|---|
static String |
DEFAULT_CONTROLLER_NAME |
ApplicationContext |
applicationContext |
Constructor and description |
---|
GrailsTestRequestEnvironmentInterceptor(ApplicationContext applicationContext) |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
destroy() Removes the mock request environment |
|
void |
doInRequestEnvironment(Closure body) Passes body to doInRequestEnvironment(String,Closure) with the DEFAULT_CONTROLLER_NAME . |
|
void |
doInRequestEnvironment(String controllerName, Closure body) Calls init() before and destroy() after invoking body . |
|
void |
init(String controllerName) Establishes a mock request environment |
Removes the mock request environment
Passes body
to doInRequestEnvironment(String,Closure)
with the DEFAULT_CONTROLLER_NAME
.
Calls init()
before and destroy()
after invoking body
.
Establishes a mock request environment