Groovy Documentation

## org.codehaus.groovy.grails.test.junit4.runner
[Groovy] Class GrailsTestCaseRunner

    java.lang.Object
      org.junit.runners.BlockJUnit4ClassRunner
          org.codehaus.groovy.grails.test.junit4.runner.GrailsTestCaseRunner

    class GrailsTestCaseRunner
    extends BlockJUnit4ClassRunner

Property Summary
`java.lang.Object` | `appCtx`
`java.lang.Object` | `mode`
`java.lang.Object` | `testTargetPatterns`

Constructor Summary
`GrailsTestCaseRunner(java.lang.Class testClass, GrailsTestTargetPattern[] testTargetPatterns)`
`GrailsTestCaseRunner(java.lang.Class testClass, GrailsTestMode mode, ApplicationContext appCtx, GrailsTestTargetPattern[] testTargetPatterns)`

Method Summary
`protected java.util.List` | `computeTestMethods()`
`protected Statement` | `methodBlock(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 Statement` | `withAfters(FrameworkMethod method, java.lang.Object target, Statement statement)`
`protected Statement` | `withBefores(FrameworkMethod method, java.lang.Object target, Statement statement)`
`protected java.lang.Object` | `withGrailsTestEnvironment(Statement statement, java.lang.Object test)`

Property Detail

### appCtx

    final java.lang.Object appCtx

### mode

    final java.lang.Object mode

### testTargetPatterns

    final java.lang.Object testTargetPatterns

Constructor Detail

### GrailsTestCaseRunner

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

### GrailsTestCaseRunner

    GrailsTestCaseRunner(java.lang.Class testClass, GrailsTestMode mode, ApplicationContext appCtx, GrailsTestTargetPattern[] testTargetPatterns)

Method Detail

### computeTestMethods

    protected java.util.List computeTestMethods()

### methodBlock

    protected Statement methodBlock(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.

### validateMode

    protected java.lang.Object validateMode()

### withAfters

    protected Statement withAfters(FrameworkMethod method, java.lang.Object target, Statement statement)

### withBefores

    protected Statement withBefores(FrameworkMethod method, java.lang.Object target, Statement statement)

### withGrailsTestEnvironment

    protected java.lang.Object withGrailsTestEnvironment(Statement statement, java.lang.Object test)

Groovy Documentation