MockTransformation (Grails 2.3.8)
Date: 2014-04-24

Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

    @org.codehaus.groovy.transform.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, TEST_ANNOTATION, VOID_TYPE

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
addFieldIfNonExistent, addMethodCallsToMethod, autoAnnotateSetupTeardown, error, getListOfClasses, getOrCreateMethodBody, getOrCreateNoArgsMethodBody, hasAnnotation, hasDeclaredMethod, isAddableMethod, isCandidateMethod, isJunit3Test, isSpockTest, visit, weaveMixinsIntoClass, weaveTestMixins

Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), 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()

Method Detail

### visit

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

Groovy Documentation