GrailsAwareGroovyTestSuite (Grails 2.4.4)
Date: 2014-10-28

Package: grails.test

## [Java] Class GrailsAwareGroovyTestSuite

- grails.test.GrailsAwareGroovyTestSuite

- 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

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected boolean` | `registerContextClassLoader` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `GrailsAwareGroovyTestSuite ()` Constructor.

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `java.lang.Class<?>` | `compile(java.lang.String fileName)`
    `protected void` | `customizeBuildSettings(BuildSettings settings)`
    `protected void` | `customizeClassInjectors(java.util.List<ClassInjector> classInjectors)`
    `protected void` | `customizeClassLoader(GrailsAwareClassLoader classLoader)`
    `protected void` | `customizeGrailsResources(java.util.List<Resource> grailsResources)`
    `protected java.io.File` | `findBaseDir()`
    `protected java.io.File` | `findGrailsHome()`
    `static void` | `main(java.lang.String[] args)`
    `static junit.framework.Test` | `suite()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `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#setName(java.lang.String), groovy.util.GroovyTestSuite#countTestCases(), groovy.util.GroovyTestSuite#tests(), groovy.util.GroovyTestSuite#addTest(junit.framework.Test), groovy.util.GroovyTestSuite#createTest(java.lang.Class, java.lang.String), groovy.util.GroovyTestSuite#testCount(), groovy.util.GroovyTestSuite#addTestSuite(java.lang.Class), groovy.util.GroovyTestSuite#getTestConstructor(java.lang.Class), groovy.util.GroovyTestSuite#testAt(int), groovy.util.GroovyTestSuite#runTest(junit.framework.Test, junit.framework.TestResult), groovy.util.GroovyTestSuite#warning(java.lang.String), groovy.util.GroovyTestSuite#wait(long, int), groovy.util.GroovyTestSuite#wait(long), groovy.util.GroovyTestSuite#wait(), groovy.util.GroovyTestSuite#equals(java.lang.Object), groovy.util.GroovyTestSuite#hashCode(), groovy.util.GroovyTestSuite#getClass(), groovy.util.GroovyTestSuite#notify(), groovy.util.GroovyTestSuite#notifyAll()`
    `class junit.framework.TestSuite` | `junit.framework.TestSuite#run(junit.framework.TestResult), junit.framework.TestSuite#toString(), junit.framework.TestSuite#getName(), junit.framework.TestSuite#setName(java.lang.String), junit.framework.TestSuite#countTestCases(), junit.framework.TestSuite#tests(), junit.framework.TestSuite#addTest(junit.framework.Test), junit.framework.TestSuite#createTest(java.lang.Class, java.lang.String), junit.framework.TestSuite#testCount(), junit.framework.TestSuite#addTestSuite(java.lang.Class), junit.framework.TestSuite#getTestConstructor(java.lang.Class), junit.framework.TestSuite#testAt(int), junit.framework.TestSuite#runTest(junit.framework.Test, junit.framework.TestResult), junit.framework.TestSuite#warning(java.lang.String), junit.framework.TestSuite#wait(long, int), junit.framework.TestSuite#wait(long), junit.framework.TestSuite#wait(), 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

    - #### protected boolean registerContextClassLoader

  - ### Constructor Detail

    - #### public GrailsAwareGroovyTestSuite()

      Constructor.

  - ### Method Detail

    - #### @java.lang.Override public java.lang.Class<?> compile(java.lang.String fileName)

    - #### protected void customizeBuildSettings(BuildSettings settings)

    - #### protected void customizeClassInjectors(java.util.List<ClassInjector> classInjectors)

    - #### protected void customizeClassLoader(GrailsAwareClassLoader classLoader)

    - #### protected void customizeGrailsResources(java.util.List<Resource> grailsResources)

    - #### protected java.io.File findBaseDir()

    - #### protected java.io.File findGrailsHome()

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

    - #### public static junit.framework.Test suite()