criteria.setUserIsRequestor(true);
return criteria;
}
private void validate(Device device) {
AuditLogger logger = device.getDeviceExtension(AuditLogger.class);
assertNotNull(logger);
assertEquals(2, logger.getConnections().size());
assertEquals(AuditMessages.SCHEMA_URI, logger.getSchemaURI());
assertEquals("MessageID", logger.getMessageID());
assertEquals("ApplicationName", logger.getApplicationName());
assertEquals("AuditEnterpriseSiteID", logger.getAuditEnterpriseSiteID());
assertEquals("AuditSourceID", logger.getAuditSourceID());
assertArrayEquals(new String[]{"4", "5"}, sort(logger.getAuditSourceTypeCodes()));
assertEquals("ISO-8859-1", logger.getEncoding());
assertEquals(AuditLogger.Facility.auth, logger.getFacility());
assertEquals(AuditLogger.Severity.info, logger.getSuccessSeverity());
assertEquals(AuditLogger.Severity.notice, logger.getMinorFailureSeverity());
assertEquals(AuditLogger.Severity.warning, logger.getSeriousFailureSeverity());
assertEquals(AuditLogger.Severity.err, logger.getMajorFailureSeverity());
assertTrue(logger.isFormatXML());
assertFalse(logger.isIncludeBOM());
assertEquals(300, logger.getRetryInterval());
assertEquals(SPOOL_DIRECTORY, logger.getSpoolDirectory());
assertTrue(logger.isIncludeInstanceUID());
validate(logger.getAuditSuppressCriteriaList());
Device arrDevice = logger.getAuditRecordRepositoryDevice();
assertNotNull(arrDevice);
AuditRecordRepository arr = arrDevice.getDeviceExtension(AuditRecordRepository.class);
assertNotNull(arr);
assertEquals(2, arr.getConnections().size());
}