Search in sources :

Example 1 with ApplicationRepoServiceImpl

use of com.enonic.xp.core.impl.app.ApplicationRepoServiceImpl 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);
}
Also used : Path(java.nio.file.Path) NodePath(com.enonic.xp.node.NodePath) AppConfig(com.enonic.xp.core.impl.app.AppConfig) ApplicationRepoServiceImpl(com.enonic.xp.core.impl.app.ApplicationRepoServiceImpl) AppFilterServiceImpl(com.enonic.xp.core.impl.app.AppFilterServiceImpl) AuditLogService(com.enonic.xp.audit.AuditLogService) ApplicationServiceImpl(com.enonic.xp.core.impl.app.ApplicationServiceImpl) EventPublisherImpl(com.enonic.xp.core.impl.event.EventPublisherImpl) ApplicationAuditLogSupportImpl(com.enonic.xp.core.impl.app.ApplicationAuditLogSupportImpl) ApplicationFactoryServiceImpl(com.enonic.xp.core.impl.app.ApplicationFactoryServiceImpl) ApplicationRegistryImpl(com.enonic.xp.core.impl.app.ApplicationRegistryImpl) ApplicationListenerHub(com.enonic.xp.core.impl.app.ApplicationListenerHub) BundleContext(org.osgi.framework.BundleContext) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

AuditLogService (com.enonic.xp.audit.AuditLogService)1 AppConfig (com.enonic.xp.core.impl.app.AppConfig)1 AppFilterServiceImpl (com.enonic.xp.core.impl.app.AppFilterServiceImpl)1 ApplicationAuditLogSupportImpl (com.enonic.xp.core.impl.app.ApplicationAuditLogSupportImpl)1 ApplicationFactoryServiceImpl (com.enonic.xp.core.impl.app.ApplicationFactoryServiceImpl)1 ApplicationListenerHub (com.enonic.xp.core.impl.app.ApplicationListenerHub)1 ApplicationRegistryImpl (com.enonic.xp.core.impl.app.ApplicationRegistryImpl)1 ApplicationRepoServiceImpl (com.enonic.xp.core.impl.app.ApplicationRepoServiceImpl)1 ApplicationServiceImpl (com.enonic.xp.core.impl.app.ApplicationServiceImpl)1 EventPublisherImpl (com.enonic.xp.core.impl.event.EventPublisherImpl)1 NodePath (com.enonic.xp.node.NodePath)1 Path (java.nio.file.Path)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1 BundleContext (org.osgi.framework.BundleContext)1