Search in sources :

Example 1 with ScheduleAuditLogExecutorImpl

use of com.enonic.xp.impl.scheduler.ScheduleAuditLogExecutorImpl in project xp by enonic.

the class SchedulerServiceImplTest method setUpNode.

@BeforeEach
protected void setUpNode() throws Exception {
    super.setUpNode();
    final AuditLogService auditLogService = Mockito.mock(AuditLogService.class);
    final SchedulerConfig schedulerConfig = Mockito.mock(SchedulerConfig.class);
    Mockito.when(schedulerConfig.auditlogEnabled()).thenReturn(Boolean.TRUE);
    final ScheduleAuditLogSupportImpl auditLogSupport = new ScheduleAuditLogSupportImpl(schedulerConfig, new ScheduleAuditLogExecutorImpl(), auditLogService);
    schedulerService = new SchedulerServiceImpl(indexService, repositoryService, nodeService, schedulerExecutorService, auditLogSupport);
    adminContext().runWith(() -> schedulerService.initialize());
    calendarService = new CalendarServiceImpl();
}
Also used : ScheduleAuditLogExecutorImpl(com.enonic.xp.impl.scheduler.ScheduleAuditLogExecutorImpl) AuditLogService(com.enonic.xp.audit.AuditLogService) SchedulerServiceImpl(com.enonic.xp.impl.scheduler.SchedulerServiceImpl) CalendarServiceImpl(com.enonic.xp.impl.scheduler.CalendarServiceImpl) ScheduleAuditLogSupportImpl(com.enonic.xp.impl.scheduler.ScheduleAuditLogSupportImpl) SchedulerConfig(com.enonic.xp.impl.scheduler.SchedulerConfig) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

AuditLogService (com.enonic.xp.audit.AuditLogService)1 CalendarServiceImpl (com.enonic.xp.impl.scheduler.CalendarServiceImpl)1 ScheduleAuditLogExecutorImpl (com.enonic.xp.impl.scheduler.ScheduleAuditLogExecutorImpl)1 ScheduleAuditLogSupportImpl (com.enonic.xp.impl.scheduler.ScheduleAuditLogSupportImpl)1 SchedulerConfig (com.enonic.xp.impl.scheduler.SchedulerConfig)1 SchedulerServiceImpl (com.enonic.xp.impl.scheduler.SchedulerServiceImpl)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1