org.codehaus.groovy.grails.test.support
Class GrailsTestTypeSupport

java.lang.Object
  extended by org.codehaus.groovy.grails.test.support.GrailsTestTypeSupport
All Implemented Interfaces:
groovy.lang.GroovyObject, GrailsTestType
Direct Known Subclasses:
JUnit3GrailsTestType

public abstract class GrailsTestTypeSupport
extends Object
implements GrailsTestType, groovy.lang.GroovyObject


Constructor Summary
GrailsTestTypeSupport(String name, String relativeSourcePath)
           
 
Method Summary
protected  groovy.lang.MetaClass $getStaticMetaClass()
           
 void cleanup()
           
protected  SystemOutAndErrSwapper createSystemOutAndErrSwapper()
           
protected abstract  int doPrepare()
           
protected abstract  GrailsTestTypeResult doRun(GrailsTestEventPublisher eventPublisher)
           
protected  void eachSourceFile(groovy.lang.Closure body)
           
protected  List<File> findSourceFiles(GrailsTestTargetPattern targetPattern)
           
 groovy.lang.Binding getBuildBinding()
           
 File getCompiledClassesDir()
           
 groovy.lang.MetaClass getMetaClass()
           
 String getName()
           
 Object getProperty(String property)
           
 String getRelativeSourcePath()
           
protected  File getSourceDir()
           
protected  ClassLoader getTestClassLoader()
           
protected  List<String> getTestExtensions()
           
protected  List<String> getTestSuffixes()
           
 GrailsTestTargetPattern[] getTestTargetPatterns()
           
 Object invokeMethod(String method, Object arguments)
           
protected  Class loadClass(String className)
           
 int prepare(GrailsTestTargetPattern[] testTargetPatterns, File compiledClassesDir, groovy.lang.Binding buildBinding)
           
 GrailsTestTypeResult run(GrailsTestEventPublisher eventPublisher)
           
 void setMetaClass(groovy.lang.MetaClass mc)
           
 void setProperty(String property, Object value)
           
protected  Class sourceFileToClass(File sourceFile)
           
protected  File sourceFileToClassFile(File sourceFile)
           
protected  String sourceFileToClassName(File sourceFile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrailsTestTypeSupport

public GrailsTestTypeSupport(String name,
                             String relativeSourcePath)
Method Detail

getName

public String getName()
Specified by:
getName in interface GrailsTestType

getRelativeSourcePath

public String getRelativeSourcePath()
Specified by:
getRelativeSourcePath in interface GrailsTestType

getTestTargetPatterns

public GrailsTestTargetPattern[] getTestTargetPatterns()

getCompiledClassesDir

public File getCompiledClassesDir()

getBuildBinding

public groovy.lang.Binding getBuildBinding()

getTestSuffixes

protected List<String> getTestSuffixes()

getTestExtensions

protected List<String> getTestExtensions()

prepare

public int prepare(GrailsTestTargetPattern[] testTargetPatterns,
                   File compiledClassesDir,
                   groovy.lang.Binding buildBinding)
Specified by:
prepare in interface GrailsTestType

doPrepare

protected abstract int doPrepare()

run

public GrailsTestTypeResult run(GrailsTestEventPublisher eventPublisher)
Specified by:
run in interface GrailsTestType

doRun

protected abstract GrailsTestTypeResult doRun(GrailsTestEventPublisher eventPublisher)

cleanup

public void cleanup()
Specified by:
cleanup in interface GrailsTestType

getSourceDir

protected File getSourceDir()

getTestClassLoader

protected ClassLoader getTestClassLoader()

findSourceFiles

protected List<File> findSourceFiles(GrailsTestTargetPattern targetPattern)

eachSourceFile

protected void eachSourceFile(groovy.lang.Closure body)

sourceFileToClassName

protected String sourceFileToClassName(File sourceFile)

sourceFileToClassFile

protected File sourceFileToClassFile(File sourceFile)

sourceFileToClass

protected Class sourceFileToClass(File sourceFile)

createSystemOutAndErrSwapper

protected SystemOutAndErrSwapper createSystemOutAndErrSwapper()

loadClass

protected Class loadClass(String className)

$getStaticMetaClass

protected groovy.lang.MetaClass $getStaticMetaClass()

getMetaClass

public groovy.lang.MetaClass getMetaClass()
Specified by:
getMetaClass in interface groovy.lang.GroovyObject

setMetaClass

public void setMetaClass(groovy.lang.MetaClass mc)
Specified by:
setMetaClass in interface groovy.lang.GroovyObject

invokeMethod

public Object invokeMethod(String method,
                           Object arguments)
Specified by:
invokeMethod in interface groovy.lang.GroovyObject

getProperty

public Object getProperty(String property)
Specified by:
getProperty in interface groovy.lang.GroovyObject

setProperty

public void setProperty(String property,
                        Object value)
Specified by:
setProperty in interface groovy.lang.GroovyObject


Copyright (c) 2005-2009 The Grails project