Transformation used by the TestFor annotation to signify the class under test.
Modifiers | Name | Description |
---|---|---|
static org.codehaus.groovy.ast.AnnotationNode |
AFTER_ANNOTATION |
|
static org.codehaus.groovy.ast.ClassNode |
AFTER_CLASS_NODE |
|
static org.codehaus.groovy.ast.AnnotationNode |
BEFORE_ANNOTATION |
|
static org.codehaus.groovy.ast.ClassNode |
BEFORE_CLASS_NODE |
|
static java.lang.String |
DOMAIN_TYPE |
|
static org.codehaus.groovy.ast.ClassNode |
GROOVY_TEST_CASE_CLASS |
|
static org.codehaus.groovy.ast.AnnotationNode |
TEST_ANNOTATION |
|
static java.lang.String |
VOID_TYPE |
|
protected static java.util.Map<java.lang.String, java.lang.Class> |
artefactTypeToTestMap |
Fields inherited from class | Fields |
---|---|
class TestMixinTransformation |
GROOVY_OBJECT_CLASS_NODE, MIXIN_METHOD_ANNOTATION, OBJECT_CLASS, SET_UP_METHOD, SPEC_CLASS, TEAR_DOWN_METHOD, TEST_ANNOTATION, VOID_TYPE |
Type Params | Return Type | Name and description |
---|---|---|
|
protected org.codehaus.groovy.ast.MethodNode |
addClassUnderTestMethod(org.codehaus.groovy.ast.ClassNode classNode, org.codehaus.groovy.ast.expr.ClassExpression targetClass, java.lang.String type) |
|
protected void |
addMockCollaborator(java.lang.String mockType, org.codehaus.groovy.ast.expr.ClassExpression targetClass, org.codehaus.groovy.ast.stmt.BlockStatement methodBody) |
|
protected void |
addMockCollaborators(org.codehaus.groovy.ast.ClassNode classNode, java.lang.String mockType, java.util.List<org.codehaus.groovy.ast.expr.ClassExpression> targetClasses) |
|
protected void |
addMockCollaborators(java.lang.String mockType, java.util.List<org.codehaus.groovy.ast.expr.ClassExpression> targetClasses, org.codehaus.groovy.ast.stmt.BlockStatement methodBody) |
|
protected org.codehaus.groovy.ast.stmt.Statement |
getExistingJUnit4BeforeMethod(org.codehaus.groovy.ast.ClassNode classNode) |
|
protected org.codehaus.groovy.ast.stmt.BlockStatement |
getExistingOrCreateJUnit4Setup(org.codehaus.groovy.ast.ClassNode classNode) |
|
protected java.lang.Class |
getMixinClassForArtefactType(org.codehaus.groovy.ast.ClassNode classNode) |
|
protected org.codehaus.groovy.ast.stmt.BlockStatement |
getOrCreateTestSetupMethod(org.codehaus.groovy.ast.ClassNode classNode) |
|
ResourceLocator |
getResourceLocator() |
|
protected void |
handleTestForAnnotation(org.codehaus.groovy.ast.ClassNode classNode, org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.AnnotationNode testForAnnotationNode, boolean junit3Test) |
|
void |
testFor(org.codehaus.groovy.ast.ClassNode classNode, org.codehaus.groovy.ast.expr.ClassExpression ce) Main entry point for the calling the TestForTransformation programmatically. |
|
void |
visit(org.codehaus.groovy.ast.ASTNode[] astNodes, org.codehaus.groovy.control.SourceUnit source) |
|
protected void |
weaveMixinClass(org.codehaus.groovy.ast.ClassNode classNode, java.lang.Class mixinClass) |
|
protected org.codehaus.groovy.ast.MethodNode |
weaveMock(org.codehaus.groovy.ast.ClassNode classNode, org.codehaus.groovy.ast.expr.ClassExpression value, boolean isClassUnderTest) |
Methods inherited from class | Name |
---|---|
class TestMixinTransformation |
addEnableEMCStatement, addJunitRuleFields, addLegacyMixinFieldIfNonExistent, addMethodCallsToMethod, addTestRuntimeAwareMixinFieldIfNonExistent, autoAnnotateSetupTeardown, error, getListOfClasses, getOrCreateMethodBody, getOrCreateNoArgsMethodBody, hasAnnotation, hasDeclaredMethod, hasSimilarMethod, isAddableMethod, isCandidateMethod, isJunit3Test, isSpockTest, shouldSkipMethod, visit, weaveMixinIntoClass, weaveMixinsIntoClass, weaveTestMixins |
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() |
Main entry point for the calling the TestForTransformation programmatically.
classNode
- The class node that represents th testce
- The class expression that represents the class to test