Search in sources :

Example 1 with TaskServiceImpl

use of com.enonic.xp.impl.task.TaskServiceImpl in project xp by enonic.

the class AbstractContentSynchronizerTest method setupTaskService.

private void setupTaskService() {
    final Bundle bundle = OsgiSupportMock.mockBundle();
    when(bundle.getSymbolicName()).thenReturn("testBundle");
    final LocalTaskManagerImpl taskMan = new LocalTaskManagerImpl(Runnable::run, new TaskManagerCleanupSchedulerMock(), event -> {
    });
    taskMan.activate();
    NamedTaskFactory namedTaskFactory = mock(NamedTaskFactory.class);
    this.taskService = new TaskServiceImpl(taskMan, namedTaskFactory);
}
Also used : LocalTaskManagerImpl(com.enonic.xp.impl.task.LocalTaskManagerImpl) Bundle(org.osgi.framework.Bundle) TaskServiceImpl(com.enonic.xp.impl.task.TaskServiceImpl) NamedTaskFactory(com.enonic.xp.impl.task.script.NamedTaskFactory)

Aggregations

LocalTaskManagerImpl (com.enonic.xp.impl.task.LocalTaskManagerImpl)1 TaskServiceImpl (com.enonic.xp.impl.task.TaskServiceImpl)1 NamedTaskFactory (com.enonic.xp.impl.task.script.NamedTaskFactory)1 Bundle (org.osgi.framework.Bundle)1