Search in sources :

Example 1 with SingleModulesRegistry

use of com.sun.enterprise.module.single.SingleModulesRegistry in project Payara by payara.

the class CommandRunnerTest method setup.

@BeforeClass
public void setup() {
    /*
         * The CommandRunnerImpl now injects Domain but these tests do not
         * exercise the code path that requires the domain.  So register a
         * dummy Domain instance with the habitat so injection will work.
         */
    ServiceLocatorUtilities.addOneDescriptor(testLocator, BuilderHelper.createConstantDescriptor(simpleDomain(), null, Domain.class));
    ServiceLocatorUtilities.addOneConstant(testLocator, new StartupContext());
    ServiceLocatorUtilities.addOneDescriptor(testLocator, BuilderHelper.createConstantDescriptor(new SingleModulesRegistry(CommandRunnerTest.class.getClassLoader()), null, ModulesRegistry.class));
}
Also used : StartupContext(com.sun.enterprise.module.bootstrap.StartupContext) SingleModulesRegistry(com.sun.enterprise.module.single.SingleModulesRegistry) SingleModulesRegistry(com.sun.enterprise.module.single.SingleModulesRegistry) ModulesRegistry(com.sun.enterprise.module.ModulesRegistry) Domain(com.sun.enterprise.config.serverbeans.Domain) BeforeClass(org.junit.BeforeClass)

Aggregations

Domain (com.sun.enterprise.config.serverbeans.Domain)1 ModulesRegistry (com.sun.enterprise.module.ModulesRegistry)1 StartupContext (com.sun.enterprise.module.bootstrap.StartupContext)1 SingleModulesRegistry (com.sun.enterprise.module.single.SingleModulesRegistry)1 BeforeClass (org.junit.BeforeClass)1