TestRuntimeFactory (Grails 3.1.10)
Date: 2016-07-28

Package: grails.test.runtime

## [Groovy] Class TestRuntimeFactory

- grails.test.runtime.TestRuntimeFactory

- TestRuntimeFactory is a singleton that contains the TestPlugin registry and has methods for getting a TestRuntime instance with given features. It will resolve the requested features and pick the minimum set of plugins that are required for covering the requested features.

  Authors:
    Lari Hotari
  Since:
    2.4.0

- - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `static void` | `addPluginClass(java.lang.Class<? extends TestPlugin> pluginClass)` Registers TestPlugin class to global static plugin registry.
    `static TestRuntime` | `getRuntimeForTestClass(java.lang.Class<?> testClass)`
    `protected java.util.List<TestPlugin>` | `instantiatePlugins(java.util.Set<java.lang.Class<? extends TestPlugin>> pluginClassesToUse)`
    `static void` | `removePluginClass(java.lang.Class<? extends TestPlugin> pluginClass)`
    `static void` | `removeRuntime(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()`

- - ### Method Detail

    - #### static void addPluginClass(java.lang.Class<? extends TestPlugin> pluginClass)

      Registers TestPlugin class to global static plugin registry. This method can be used in static initialization blocks of a class. However it's recommended that the mixin class implements TestPluginRegistrar to register the plugins that implement the features required by the mixin class.

      Parameters:
        pluginClass

    - #### static TestRuntime getRuntimeForTestClass(java.lang.Class<?> testClass)

    - #### protected java.util.List<TestPlugin> instantiatePlugins(java.util.Set<java.lang.Class<? extends TestPlugin>> pluginClassesToUse)

    - #### static void removePluginClass(java.lang.Class<? extends TestPlugin> pluginClass)

    - #### static void removeRuntime(TestRuntime runtime)