use of org.nhindirect.common.audit.impl.MultiProviderAuditor in project nhin-d by DirectProject.
the class MultiProviderAuditorTest method testAudit_NullEvent_AssertExeption.
@Test
public void testAudit_NullEvent_AssertExeption() {
Auditor auditor = new MultiProviderAuditor(Arrays.asList(new LoggingAuditor(), new NoOpAuditor()));
boolean exceptionOccured = false;
try {
auditor.audit(PRINCIPAL, null);
} catch (IllegalArgumentException e) {
exceptionOccured = true;
}
assertTrue(exceptionOccured);
}
use of org.nhindirect.common.audit.impl.MultiProviderAuditor in project nhin-d by DirectProject.
the class MultiProviderAuditorTest method testAuditWithContext.
@Test
public void testAuditWithContext() {
Auditor auditor = new MultiProviderAuditor(Arrays.asList(new LoggingAuditor(), new NoOpAuditor()));
Collection<? extends AuditContext> ctx = Arrays.asList(new DefaultAuditContext("name", "value"));
auditor.audit(PRINCIPAL, UNIT_TEST_EVENT, ctx);
}
Aggregations