@groovy.transform.Trait @groovy.transform.CompileStatic trait InterceptorUnitTest<T> extends java.lang.Object implements GrailsWebUnitTest, ParameterizedGrailsUnitTest<T>
Modifiers | Name | Description |
---|---|---|
private boolean |
hasBeenMocked |
Type Params | Return Type | Name and description |
---|---|---|
|
private void |
ensureInterceptorHasBeenMocked() |
|
java.lang.String |
getBeanName(java.lang.Class<?> interceptorClass) |
|
private GrailsInterceptorHandlerInterceptorAdapter |
getHandlerInterceptor() |
|
T |
getInterceptor() |
|
private java.lang.Class<T> |
getInterceptorTypeUnderTest() |
|
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 |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
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