use of com.enonic.xp.audit.AuditLog in project xp by enonic.
the class AuditLogServiceImplTest method log_with_only_type.
@Test
public void log_with_only_type() {
AuditLog log = auditLogService.log(LogAuditLogParams.create().type("test").build());
assertLog(log);
}
use of com.enonic.xp.audit.AuditLog in project xp by enonic.
the class AuditLogServiceImplDisabledTest method log_when_disabled.
@Test
public void log_when_disabled() {
AuditLog log = auditLogService.log(LogAuditLogParams.create().type("test").build());
assertNull(log);
}
use of com.enonic.xp.audit.AuditLog in project xp by enonic.
the class FindAuditLogHandlerTest method mockCreateLog.
public void mockCreateLog() {
AuditLog mocklog = auditLogBuilder(LogAuditLogParams.create().type("testlog").build()).source("testbundle").build();
Mockito.when(this.auditLogService.find(Mockito.any(FindAuditLogParams.class))).thenReturn(FindAuditLogResult.create().hits(AuditLogs.from(mocklog)).total(2L).build());
}
use of com.enonic.xp.audit.AuditLog in project xp by enonic.
the class GetAuditLogHandlerTest method mockCreateLog.
public void mockCreateLog() {
AuditLog mocklog = auditLogBuilder(LogAuditLogParams.create().type("testlog").build()).source("testbundle").build();
Mockito.when(this.auditLogService.get(Mockito.any(AuditLogId.class))).thenReturn(mocklog);
}
Aggregations