Groovy Documentation

org.codehaus.groovy.grails.compiler.injection.test
[Java] Class MockTransformation

java.lang.Object
  org.codehaus.groovy.grails.compiler.injection.test.TestMixinTransformation
      org.codehaus.groovy.grails.compiler.injection.test.TestForTransformation
          org.codehaus.groovy.grails.compiler.injection.test.MockTransformation

@GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION)
public class MockTransformation
extends TestForTransformation

Used by the Mock local transformation to add mocking capabilities for the given classes.

Authors:
Graeme Rocher
Since:
2.0


Field Summary
 
Fields inherited from class TestForTransformation
AFTER_ANNOTATION, AFTER_CLASS_NODE, BEFORE_ANNOTATION, BEFORE_CLASS_NODE, DOMAIN_TYPE, GROOVY_TEST_CASE_CLASS, TEST_ANNOTATION, VOID_TYPE, artefactTypeToTestMap
 
Fields inherited from class TestMixinTransformation
GROOVY_OBJECT_CLASS_NODE, MIXIN_METHOD_ANNOTATION, OBJECT_CLASS, SET_UP_METHOD, SPEC_CLASS, TEAR_DOWN_METHOD, THIS_EXPRESSION
 
Method Summary
void visit(org.codehaus.groovy.ast.ASTNode[] astNodes, org.codehaus.groovy.control.SourceUnit source)

 
Methods inherited from class TestForTransformation
addClassUnderTestMethod, addMockCollaborator, addMockCollaborators, addMockCollaborators, getExistingJUnit4BeforeMethod, getExistingOrCreateJUnit4Setup, getMixinClassForArtefactType, getOrCreateTestSetupMethod, getResourceLocator, testFor, visit, weaveMixinClass, weaveMock
 
Methods inherited from class TestMixinTransformation
addMethodCallsToMethod, autoAnnotateSetupTeardown, error, getListOfClasses, getOrCreateMethodBody, getOrCreateNoArgsMethodBody, hasAnnotation, hasDeclaredMethod, isAddableMethod, isCandidateMethod, isJunit3Test, isSpockTest, visit, weaveMixinsIntoClass
 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), 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()
 

Method Detail

visit

@Override
public void visit(org.codehaus.groovy.ast.ASTNode[] astNodes, org.codehaus.groovy.control.SourceUnit source)


 

Groovy Documentation