@groovy.transform.CompileStatic trait InterceptorUnitTest
| Type Params | Return Type | Name and description |
|---|---|---|
|
java.lang.String |
getBeanName(java.lang.Class<?> interceptorClass) |
|
T |
getInterceptor() |
|
void |
mockArtefact(java.lang.Class<?> interceptorClass) |
|
groovy.lang.Interceptor |
mockInterceptor(java.lang.Class<?> interceptorClass)Mock the interceptor for the given name |
|
java.lang.Object |
withInterceptors(java.util.Map<java.lang.String, java.lang.Object> arguments, groovy.lang.Closure callable)Execute the given request with the registered interceptors |
|
UrlMappingInfo |
withRequest(java.util.Map<java.lang.String, java.lang.Object> arguments)Allows testing of the interceptor directly by setting up an incoming request that can be matched prior to invoking the interceptor |
Mock the interceptor for the given name
interceptorClass - The interceptor classExecute the given request with the registered interceptors
arguments - The argumentscallable - A callable containing an invocation of a controller actionAllows testing of the interceptor directly by setting up an incoming request that can be matched prior to invoking the interceptor
arguments - Named arguments specifying the controller/action or URI that interceptor should match