Groovy Documentation

grails.test
[Java] Class GrailsAwareGroovyTestSuite

java.lang.Object
  junit.framework.TestSuite
      groovy.util.GroovyTestSuite
          grails.test.GrailsAwareGroovyTestSuite

@Deprecated
public class GrailsAwareGroovyTestSuite
extends groovy.util.GroovyTestSuite

Adds support for running Grails JUnit Tests from Eclipse JUnit runner or even from the command line. Set GRAILS_HOME environment variable before running the test. Change the working directory to the Grails application's root directory. There are several extension points (protected template methods customize*) for customizing behaviour in a subclass. You will have to copy&paste the suite() and main() methods to the subclass because they are static methods Contributed by Lari Hotari

deprecated:
@since 1.1
Authors:
Graeme Rocher
Lari Hotari


Field Summary
protected boolean registerContextClassLoader

 
Constructor Summary
GrailsAwareGroovyTestSuite()

Constructor.

 
Method Summary
java.lang.Class compile(java.lang.String fileName)

protected void customizeBuildSettings(BuildSettings settings)

protected void customizeClassInjectors(java.util.List classInjectors)

protected void customizeClassLoader(GrailsAwareClassLoader classLoader)

protected void customizeGrailsResources(java.util.List grailsResources)

protected java.io.File findBaseDir()

protected java.io.File findGrailsHome()

static void main(java.lang.String[] args)

static junit.framework.Test suite()

 
Methods inherited from class groovy.util.GroovyTestSuite
groovy.util.GroovyTestSuite#main([Ljava.lang.String;), groovy.util.GroovyTestSuite#compile(java.lang.String), groovy.util.GroovyTestSuite#suite(), groovy.util.GroovyTestSuite#loadTestSuite(), groovy.util.GroovyTestSuite#run(junit.framework.TestResult), groovy.util.GroovyTestSuite#toString(), groovy.util.GroovyTestSuite#getName(), groovy.util.GroovyTestSuite#tests(), groovy.util.GroovyTestSuite#setName(java.lang.String), groovy.util.GroovyTestSuite#warning(java.lang.String), groovy.util.GroovyTestSuite#addTest(junit.framework.Test), groovy.util.GroovyTestSuite#testCount(), groovy.util.GroovyTestSuite#countTestCases(), groovy.util.GroovyTestSuite#runTest(junit.framework.Test, junit.framework.TestResult), groovy.util.GroovyTestSuite#createTest(java.lang.Class, java.lang.String), groovy.util.GroovyTestSuite#getTestConstructor(java.lang.Class), groovy.util.GroovyTestSuite#addTestSuite(java.lang.Class), groovy.util.GroovyTestSuite#testAt(int), groovy.util.GroovyTestSuite#wait(), groovy.util.GroovyTestSuite#wait(long, int), groovy.util.GroovyTestSuite#wait(long), groovy.util.GroovyTestSuite#equals(java.lang.Object), groovy.util.GroovyTestSuite#hashCode(), groovy.util.GroovyTestSuite#getClass(), groovy.util.GroovyTestSuite#notify(), groovy.util.GroovyTestSuite#notifyAll()
 
Methods inherited from class junit.framework.TestSuite
junit.framework.TestSuite#run(junit.framework.TestResult), junit.framework.TestSuite#toString(), junit.framework.TestSuite#getName(), junit.framework.TestSuite#tests(), junit.framework.TestSuite#setName(java.lang.String), junit.framework.TestSuite#warning(java.lang.String), junit.framework.TestSuite#addTest(junit.framework.Test), junit.framework.TestSuite#testCount(), junit.framework.TestSuite#countTestCases(), junit.framework.TestSuite#runTest(junit.framework.Test, junit.framework.TestResult), junit.framework.TestSuite#createTest(java.lang.Class, java.lang.String), junit.framework.TestSuite#getTestConstructor(java.lang.Class), junit.framework.TestSuite#addTestSuite(java.lang.Class), junit.framework.TestSuite#testAt(int), junit.framework.TestSuite#wait(), junit.framework.TestSuite#wait(long, int), junit.framework.TestSuite#wait(long), junit.framework.TestSuite#equals(java.lang.Object), junit.framework.TestSuite#hashCode(), junit.framework.TestSuite#getClass(), junit.framework.TestSuite#notify(), junit.framework.TestSuite#notifyAll()
 

Field Detail

registerContextClassLoader

protected boolean registerContextClassLoader


 
Constructor Detail

GrailsAwareGroovyTestSuite

public GrailsAwareGroovyTestSuite()
Constructor.


 
Method Detail

compile

}
public java.lang.Class compile(java.lang.String fileName)


customizeBuildSettings

protected void customizeBuildSettings( BuildSettings settings)


customizeClassInjectors

protected void customizeClassInjectors( java.util.List classInjectors)


customizeClassLoader

protected void customizeClassLoader(@SuppressWarnings("unused") GrailsAwareClassLoader classLoader)


customizeGrailsResources

protected void customizeGrailsResources( java.util.List grailsResources)


findBaseDir

protected java.io.File findBaseDir()


findGrailsHome

protected java.io.File findGrailsHome()


main

public static void main(java.lang.String[] args)


suite

public static junit.framework.Test suite()


 

Groovy Documentation