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));
}
Aggregations