Search in sources :

Example 6 with DefaultGrailsPlugin

use of org.grails.plugins.DefaultGrailsPlugin in project grails-core by grails.

the class DefaultGrailsPluginTests method testGetName.

public void testGetName() {
    GrailsPlugin versionPlugin = new DefaultGrailsPlugin(versioned, ga);
    assertEquals("my", versionPlugin.getName());
}
Also used : GrailsPlugin(grails.plugins.GrailsPlugin) DefaultGrailsPlugin(org.grails.plugins.DefaultGrailsPlugin) DefaultGrailsPlugin(org.grails.plugins.DefaultGrailsPlugin)

Example 7 with DefaultGrailsPlugin

use of org.grails.plugins.DefaultGrailsPlugin in project grails-core by grails.

the class DefaultGrailsPluginTests method testDoWithRuntimeConfiguration.

public void testDoWithRuntimeConfiguration() {
    GrailsPlugin versionPlugin = new DefaultGrailsPlugin(versioned, ga);
    RuntimeSpringConfiguration springConfig = new DefaultRuntimeSpringConfiguration();
    versionPlugin.doWithRuntimeConfiguration(springConfig);
    ApplicationContext ctx = springConfig.getApplicationContext();
    assertTrue(ctx.containsBean("classEditor"));
}
Also used : ApplicationContext(org.springframework.context.ApplicationContext) GrailsPlugin(grails.plugins.GrailsPlugin) DefaultGrailsPlugin(org.grails.plugins.DefaultGrailsPlugin) DefaultRuntimeSpringConfiguration(org.grails.spring.DefaultRuntimeSpringConfiguration) RuntimeSpringConfiguration(org.grails.spring.RuntimeSpringConfiguration) DefaultRuntimeSpringConfiguration(org.grails.spring.DefaultRuntimeSpringConfiguration) DefaultGrailsPlugin(org.grails.plugins.DefaultGrailsPlugin)

Example 8 with DefaultGrailsPlugin

use of org.grails.plugins.DefaultGrailsPlugin in project grails-core by grails.

the class DefaultGrailsPluginTests method testDoWithApplicationContext.

public void testDoWithApplicationContext() {
    GrailsPlugin versionPlugin = new DefaultGrailsPlugin(versioned, ga);
    RuntimeSpringConfiguration springConfig = new DefaultRuntimeSpringConfiguration();
    versionPlugin.doWithRuntimeConfiguration(springConfig);
    ApplicationContext ctx = springConfig.getApplicationContext();
    assertTrue(ctx.containsBean("classEditor"));
    versionPlugin.doWithApplicationContext(ctx);
}
Also used : ApplicationContext(org.springframework.context.ApplicationContext) GrailsPlugin(grails.plugins.GrailsPlugin) DefaultGrailsPlugin(org.grails.plugins.DefaultGrailsPlugin) DefaultRuntimeSpringConfiguration(org.grails.spring.DefaultRuntimeSpringConfiguration) RuntimeSpringConfiguration(org.grails.spring.RuntimeSpringConfiguration) DefaultRuntimeSpringConfiguration(org.grails.spring.DefaultRuntimeSpringConfiguration) DefaultGrailsPlugin(org.grails.plugins.DefaultGrailsPlugin)

Example 9 with DefaultGrailsPlugin

use of org.grails.plugins.DefaultGrailsPlugin in project grails-core by grails.

the class DefaultGrailsPluginTests method testObservers.

public void testObservers() {
    GrailsPlugin observingPlugin = new DefaultGrailsPlugin(observed, ga);
    assertEquals(1, observingPlugin.getObservedPluginNames().length);
    assertEquals("another", observingPlugin.getObservedPluginNames()[0]);
}
Also used : GrailsPlugin(grails.plugins.GrailsPlugin) DefaultGrailsPlugin(org.grails.plugins.DefaultGrailsPlugin) DefaultGrailsPlugin(org.grails.plugins.DefaultGrailsPlugin)

Aggregations

GrailsPlugin (grails.plugins.GrailsPlugin)9 DefaultGrailsPlugin (org.grails.plugins.DefaultGrailsPlugin)9 DefaultRuntimeSpringConfiguration (org.grails.spring.DefaultRuntimeSpringConfiguration)2 RuntimeSpringConfiguration (org.grails.spring.RuntimeSpringConfiguration)2 ApplicationContext (org.springframework.context.ApplicationContext)2 PluginException (grails.plugins.exceptions.PluginException)1