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

Package: grails.test.runtime

## [Groovy] Class GrailsApplicationTestPlugin

- grails.test.runtime.GrailsApplicationTestPlugin

- All Implemented Interfaces and Traits:
    TestPlugin

      @groovy.transform.CompileStatic
      class GrailsApplicationTestPlugin
      extends java.lang.Object

  A TestPlugin for TestRuntime that builds the GrailsApplication instance for tests

  Authors:
    Lari Hotari
  Since:
    2.4.0

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `int` | `ordinal`
    `java.lang.String[]` | `providedFeatures`
    `java.util.List<groovy.lang.Closure>` | `queuedBeanClosures`
    `java.util.List<groovy.lang.Closure>` | `queuedParentBeanClosures`
    `java.lang.String[]` | `requiredFeatures`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `protected java.lang.Object` | `addGrailsApplicationHolder(DefaultGrailsApplication grailsApplication)`
    `void` | `applicationInitialized(TestRuntime runtime, DefaultGrailsApplication grailsApplication)`
    `void` | `close(TestRuntime runtime)`
    `protected DefaultGrailsApplication` | `createGrailsApplication(TestRuntime runtime, java.util.Map callerInfo)`
    `protected GrailsWebApplicationContext` | `createMainContext(TestRuntime runtime, java.util.Map callerInfo, GrailsApplication grailsApplication, javax.servlet.ServletContext servletContext)`
    `protected void` | `createParentBeans(TestRuntime runtime, RuntimeSpringConfiguration targetSpringConfig, GrailsApplication grailsApplication)`
    `protected GrailsWebApplicationContext` | `createParentContext(TestRuntime runtime, java.util.Map callerInfo, GrailsApplication grailsApplication, javax.servlet.ServletContext servletContext)`
    `protected javax.servlet.ServletContext` | `createServletContext(TestRuntime runtime, java.util.Map callerInfo)`
    `void` | `defineBeans(TestRuntime runtime, java.util.List<groovy.lang.Closure> callables, RuntimeSpringConfiguration targetSpringConfig = null, boolean parent = false)`
    `void` | `executeDoWithConfigCallback(TestRuntime runtime, GrailsApplication grailsApplication, java.util.Map callerInfo)`
    `void` | `executeDoWithSpringCallback(TestRuntime runtime, GrailsApplication grailsApplication, java.util.Map callerInfo)`
    `protected void` | `finishQueuingDefineBeans(TestRuntime runtime, RuntimeSpringConfiguration targetSpringConfig, boolean parent = false)`
    `GrailsApplication` | `getGrailsApplication(TestRuntime runtime)`
    `java.util.Set` | `getLoadedCodecs(TestRuntime runtime)`
    `void` | `initGrailsApplication(TestRuntime runtime, java.util.Map callerInfo)`
    `void` | `initialState()`
    `void` | `mockCodec(TestRuntime runtime, java.lang.Class codecClass)`
    `void` | `mockForConstraintsTests(TestRuntime runtime, java.lang.Class clazz, java.util.List instances)`
    `void` | `onTestEvent(TestEvent event)`
    `void` | `registerBeans(TestRuntime runtime, GrailsApplication grailsApplication)`
    `void` | `registerParentBeans(TestRuntime runtime, GrailsApplication grailsApplication)`
    `void` | `resetGrailsApplication(TestRuntime runtime)`
    `protected java.lang.ClassLoader` | `resolveClassLoader()`
    `protected java.lang.Object` | `resolveTestCallback(java.util.Map callerInfo, java.lang.String propertyName, java.lang.String methodName = null)`
    `void` | `shutdownApplicationContext(TestRuntime runtime)`
    `protected void` | `startQueuingDefineBeans(TestRuntime runtime, boolean parent = false)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Property Detail

    - #### int ordinal

    - #### java.lang.String[] providedFeatures

    - #### java.util.List<groovy.lang.Closure> queuedBeanClosures

    - #### java.util.List<groovy.lang.Closure> queuedParentBeanClosures

    - #### java.lang.String[] requiredFeatures

  - ### Method Detail

    - #### protected java.lang.Object addGrailsApplicationHolder(DefaultGrailsApplication grailsApplication)

    - #### void applicationInitialized(TestRuntime runtime, DefaultGrailsApplication grailsApplication)

    - #### void close(TestRuntime runtime)

    - #### protected DefaultGrailsApplication createGrailsApplication(TestRuntime runtime, java.util.Map callerInfo)

    - #### protected GrailsWebApplicationContext createMainContext(TestRuntime runtime, java.util.Map callerInfo, GrailsApplication grailsApplication, javax.servlet.ServletContext servletContext)

    - #### protected void createParentBeans(TestRuntime runtime, RuntimeSpringConfiguration targetSpringConfig, GrailsApplication grailsApplication)

    - #### protected GrailsWebApplicationContext createParentContext(TestRuntime runtime, java.util.Map callerInfo, GrailsApplication grailsApplication, javax.servlet.ServletContext servletContext)

    - #### protected javax.servlet.ServletContext createServletContext(TestRuntime runtime, java.util.Map callerInfo)

    - #### void defineBeans(TestRuntime runtime, java.util.List<groovy.lang.Closure> callables, RuntimeSpringConfiguration targetSpringConfig = null, boolean parent = false)

    - #### void executeDoWithConfigCallback(TestRuntime runtime, GrailsApplication grailsApplication, java.util.Map callerInfo)

    - #### void executeDoWithSpringCallback(TestRuntime runtime, GrailsApplication grailsApplication, java.util.Map callerInfo)

    - #### protected void finishQueuingDefineBeans(TestRuntime runtime, RuntimeSpringConfiguration targetSpringConfig, boolean parent = false)

    - #### GrailsApplication getGrailsApplication(TestRuntime runtime)

    - #### java.util.Set getLoadedCodecs(TestRuntime runtime)

    - #### void initGrailsApplication(TestRuntime runtime, java.util.Map callerInfo)

    - #### void initialState()

    - #### void mockCodec(TestRuntime runtime, java.lang.Class codecClass)

    - #### void mockForConstraintsTests(TestRuntime runtime, java.lang.Class clazz, java.util.List instances)

    - #### void onTestEvent(TestEvent event)

    - #### void registerBeans(TestRuntime runtime, GrailsApplication grailsApplication)

    - #### void registerParentBeans(TestRuntime runtime, GrailsApplication grailsApplication)

    - #### void resetGrailsApplication(TestRuntime runtime)

    - #### protected java.lang.ClassLoader resolveClassLoader()

    - #### @groovy.transform.CompileStatic(TypeCheckingMode.SKIP) protected java.lang.Object resolveTestCallback(java.util.Map callerInfo, java.lang.String propertyName, java.lang.String methodName = null)

    - #### void shutdownApplicationContext(TestRuntime runtime)

    - #### protected void startQueuingDefineBeans(TestRuntime runtime, boolean parent = false)