use of com.enonic.xp.core.impl.app.ApplicationServiceImpl in project xp by enonic.
the class ApplicationServiceTest method setUp.
@BeforeEach
public void setUp() throws Exception {
Path cacheDir = Files.createDirectory(this.felixTempFolder.resolve("cache")).toAbsolutePath();
this.felix = createFelixInstance(cacheDir);
this.felix.start();
AppConfig appConfig = mock(AppConfig.class, invocation -> invocation.getMethod().getDefaultValue());
ApplicationRepoServiceImpl repoService = new ApplicationRepoServiceImpl(nodeService, indexService);
repoService.initialize();
BundleContext bundleContext = felix.getBundleContext();
ApplicationFactoryServiceImpl applicationFactoryService = new ApplicationFactoryServiceImpl(bundleContext);
applicationFactoryService.activate();
ApplicationAuditLogSupportImpl applicationAuditLogSupport = new ApplicationAuditLogSupportImpl(mock(AuditLogService.class));
applicationAuditLogSupport.activate(appConfig);
this.applicationService = new ApplicationServiceImpl(bundleContext, new ApplicationRegistryImpl(bundleContext, new ApplicationListenerHub(), applicationFactoryService), repoService, new EventPublisherImpl(Executors.newSingleThreadExecutor()), new AppFilterServiceImpl(appConfig), applicationAuditLogSupport);
}
Aggregations