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

Package: org.codehaus.groovy.grails.test.junit4.runner

## [Groovy] Class GrailsTestCaseRunner

- org.codehaus.groovy.grails.test.junit4.runner.GrailsTestCaseRunner

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `java.lang.Object` | `appCtx`
    `java.lang.Object` | `mode`
    `java.lang.Object` | `testTargetPatterns`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `GrailsTestCaseRunner (java.lang.Class testClass, GrailsTestTargetPattern[] testTargetPatterns)`
    `GrailsTestCaseRunner (java.lang.Class testClass, GrailsTestMode mode, org.springframework.context.ApplicationContext appCtx, GrailsTestTargetPattern[] testTargetPatterns)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `protected java.util.List<org.junit.runners.model.FrameworkMethod>` | `computeTestMethods()`
    `protected org.junit.runners.model.Statement` | `methodBlock(org.junit.runners.model.FrameworkMethod method)` This is the only suitable hook that allows us to wrap the before/after methods in transactions etc.
    `protected java.lang.Object` | `validateMode()`
    `protected org.junit.runners.model.Statement` | `withAfters(org.junit.runners.model.FrameworkMethod method, java.lang.Object target, org.junit.runners.model.Statement statement)`
    `protected org.junit.runners.model.Statement` | `withBefores(org.junit.runners.model.FrameworkMethod method, java.lang.Object target, org.junit.runners.model.Statement statement)`
    `protected java.lang.Object` | `withGrailsTestEnvironment(org.junit.runners.model.Statement statement, java.lang.Object test)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class org.junit.runners.BlockJUnit4ClassRunner` | `org.junit.runners.BlockJUnit4ClassRunner#run(org.junit.runner.notification.RunNotifier), org.junit.runners.BlockJUnit4ClassRunner#sort(org.junit.runner.manipulation.Sorter), org.junit.runners.BlockJUnit4ClassRunner#filter(org.junit.runner.manipulation.Filter), org.junit.runners.BlockJUnit4ClassRunner#getDescription(), org.junit.runners.BlockJUnit4ClassRunner#setScheduler(org.junit.runners.model.RunnerScheduler), org.junit.runners.BlockJUnit4ClassRunner#getTestClass(), org.junit.runners.BlockJUnit4ClassRunner#testCount(), org.junit.runners.BlockJUnit4ClassRunner#wait(long, int), org.junit.runners.BlockJUnit4ClassRunner#wait(long), org.junit.runners.BlockJUnit4ClassRunner#wait(), org.junit.runners.BlockJUnit4ClassRunner#equals(java.lang.Object), org.junit.runners.BlockJUnit4ClassRunner#toString(), org.junit.runners.BlockJUnit4ClassRunner#hashCode(), org.junit.runners.BlockJUnit4ClassRunner#getClass(), org.junit.runners.BlockJUnit4ClassRunner#notify(), org.junit.runners.BlockJUnit4ClassRunner#notifyAll()`
    `class org.junit.runners.ParentRunner` | `org.junit.runners.ParentRunner#run(org.junit.runner.notification.RunNotifier), org.junit.runners.ParentRunner#sort(org.junit.runner.manipulation.Sorter), org.junit.runners.ParentRunner#filter(org.junit.runner.manipulation.Filter), org.junit.runners.ParentRunner#getDescription(), org.junit.runners.ParentRunner#setScheduler(org.junit.runners.model.RunnerScheduler), org.junit.runners.ParentRunner#getTestClass(), org.junit.runners.ParentRunner#testCount(), org.junit.runners.ParentRunner#wait(long, int), org.junit.runners.ParentRunner#wait(long), org.junit.runners.ParentRunner#wait(), org.junit.runners.ParentRunner#equals(java.lang.Object), org.junit.runners.ParentRunner#toString(), org.junit.runners.ParentRunner#hashCode(), org.junit.runners.ParentRunner#getClass(), org.junit.runners.ParentRunner#notify(), org.junit.runners.ParentRunner#notifyAll()`

- - ### Property Detail

    - #### final java.lang.Object appCtx

    - #### final java.lang.Object mode

    - #### final java.lang.Object testTargetPatterns

  - ### Constructor Detail

    - #### GrailsTestCaseRunner(java.lang.Class testClass, GrailsTestTargetPattern[] testTargetPatterns)

    - #### GrailsTestCaseRunner(java.lang.Class testClass, GrailsTestMode mode, org.springframework.context.ApplicationContext appCtx, GrailsTestTargetPattern[] testTargetPatterns)

  - ### Method Detail

    - #### protected java.util.List<org.junit.runners.model.FrameworkMethod> computeTestMethods()

    - #### protected org.junit.runners.model.Statement methodBlock(org.junit.runners.model.FrameworkMethod method)

      This is the only suitable hook that allows us to wrap the before/after methods in transactions etc. Unfortunately, that means we have to copy most the implementation from BlockJUnit4ClassRunner.

    - #### protected java.lang.Object validateMode()

    - #### protected org.junit.runners.model.Statement withAfters(org.junit.runners.model.FrameworkMethod method, java.lang.Object target, org.junit.runners.model.Statement statement)

    - #### protected org.junit.runners.model.Statement withBefores(org.junit.runners.model.FrameworkMethod method, java.lang.Object target, org.junit.runners.model.Statement statement)

    - #### protected java.lang.Object withGrailsTestEnvironment(org.junit.runners.model.Statement statement, java.lang.Object test)