use of com.qcadoo.plugin.api.PluginManager in project qcadoo by qcadoo.
the class PluginIntegrationTest method init.
@Before
public void init() throws Exception {
MultiTenantUtil multiTenantUtil = new MultiTenantUtil();
ReflectionTestUtils.setField(multiTenantUtil, "multiTenantService", new DefaultMultiTenantService());
multiTenantUtil.init();
PluginStateResolver mockPluginStateResolver = mock(PluginStateResolver.class);
given(mockPluginStateResolver.isEnabled(Mockito.anyString())).willReturn(true);
PluginUtilsService pluginUtil = new PluginUtilsService(mockPluginStateResolver);
pluginUtil.init();
new File("target/plugins").mkdir();
new File("target/tmpPlugins").mkdir();
applicationContext = new ClassPathXmlApplicationContext();
applicationContext.setConfigLocation("com/qcadoo/plugin/integration/spring.xml");
applicationContext.registerShutdownHook();
applicationContext.refresh();
pluginAccessor = applicationContext.getBean(InternalPluginAccessor.class);
pluginManager = applicationContext.getBean(PluginManager.class);
sessionFactory = applicationContext.getBean(SessionFactory.class);
}
Aggregations