GrailsApplicationTestPlugin (Grails 3.1.1)
Date: 2016-02-04

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

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `static class` | `GrailsApplicationTestPlugin.TestRuntimeGrailsApplicationPostProcessor` |

  - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected static boolean` | `isServletApiPresent` |
    `protected org.slf4j.Logger` | `log` |

  - ### Properties Summary

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

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `applicationInitialized(TestRuntime runtime, GrailsApplication grailsApplication)`
    `void` | `clearConvertersHolder()`
    `void` | `close(TestRuntime runtime)`
    `void` | `closeCachedSpringTestContexts()`
    `protected void` | `configureServletEnvironment(java.lang.Object servletContext, GrailsApplication grailsApplication, org.springframework.context.ConfigurableApplicationContext mainContext)`
    `protected org.springframework.context.ConfigurableApplicationContext` | `createMainContext(TestRuntime runtime, java.util.Map callerInfo, java.lang.Object servletContext)`
    `protected java.lang.Object` | `createServletContext(TestRuntime runtime, java.util.Map callerInfo)`
    `protected void` | `customizeContext(org.springframework.context.ConfigurableApplicationContext applicationContext, org.springframework.beans.factory.config.ConfigurableBeanFactory beanFactory, TestRuntime runtime, java.util.Map callerInfo)`
    `protected void` | `customizeGrailsApplication(GrailsApplication grailsApplication, TestRuntime runtime, java.util.Map callerInfo)`
    `void` | `defineBeans(TestRuntime runtime, java.util.List<groovy.lang.Closure> callables, RuntimeSpringConfiguration targetSpringConfig = null)`
    `void` | `doCloseCachedSpringTestContexts()`
    `void` | `executeDoWithConfigCallback(TestRuntime runtime, GrailsApplication grailsApplication, java.util.Map callerInfo)`
    `void` | `executeDoWithSpringCallback(TestRuntime runtime, java.util.Map callerInfo)`
    `protected void` | `finishQueuingDefineBeans(TestRuntime runtime, RuntimeSpringConfiguration targetSpringConfig)`
    `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` | `onTestEvent(TestEvent event)`
    `protected void` | `prepareContext(org.springframework.context.ConfigurableApplicationContext applicationContext, org.springframework.beans.factory.config.ConfigurableBeanFactory beanFactory, TestRuntime runtime, java.util.Map callerInfo)`
    `void` | `registerBeans(TestRuntime runtime, GrailsApplication grailsApplication)`
    `protected void` | `registerGrailsAppPostProcessorBean(org.springframework.context.ConfigurableApplicationContext applicationContext, org.springframework.beans.factory.config.ConfigurableBeanFactory beanFactory, TestRuntime runtime, java.util.Map callerInfo)`
    `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)`

  - ### 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()`

- - ### Field Detail

    - #### protected static final boolean isServletApiPresent

    - #### protected final org.slf4j.Logger log

  - ### Property Detail

    - #### static boolean disableClearSpringTestContextManagerCache

    - #### int ordinal

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

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

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

  - ### Method Detail

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

    - #### @groovy.transform.CompileDynamic void clearConvertersHolder()

    - #### void close(TestRuntime runtime)

    - #### void closeCachedSpringTestContexts()

    - #### @groovy.transform.CompileDynamic protected void configureServletEnvironment(java.lang.Object servletContext, GrailsApplication grailsApplication, org.springframework.context.ConfigurableApplicationContext mainContext)

    - #### protected org.springframework.context.ConfigurableApplicationContext createMainContext(TestRuntime runtime, java.util.Map callerInfo, java.lang.Object servletContext)

    - #### protected java.lang.Object createServletContext(TestRuntime runtime, java.util.Map callerInfo)

    - #### protected void customizeContext(org.springframework.context.ConfigurableApplicationContext applicationContext, org.springframework.beans.factory.config.ConfigurableBeanFactory beanFactory, TestRuntime runtime, java.util.Map callerInfo)

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

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

    - #### @groovy.transform.CompileDynamic void doCloseCachedSpringTestContexts()

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

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

    - #### protected void finishQueuingDefineBeans(TestRuntime runtime, RuntimeSpringConfiguration targetSpringConfig)

    - #### 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 onTestEvent(TestEvent event)

    - #### protected void prepareContext(org.springframework.context.ConfigurableApplicationContext applicationContext, org.springframework.beans.factory.config.ConfigurableBeanFactory beanFactory, TestRuntime runtime, java.util.Map callerInfo)

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

    - #### @groovy.transform.CompileDynamic protected void registerGrailsAppPostProcessorBean(org.springframework.context.ConfigurableApplicationContext applicationContext, org.springframework.beans.factory.config.ConfigurableBeanFactory beanFactory, TestRuntime runtime, java.util.Map callerInfo)

    - #### 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)