private void AssertAuditEventResultForItem(EntityItemAuditType auditEventEntity, AuditEventStatus expectedAuditEventStatus) { Assert.AreEqual(expectedAuditEventStatus.ToString(), auditEventEntity.Value, "Unexpected audit event item was found"); }
private void AssertAllEntitiesWasCreated(auditeventpolicy_item auditEventPolicyItem, AuditEventStatus withDefaultValue) { Assert.IsNotNull(auditEventPolicyItem.account_logon, string.Format(UNEXPECTED_NULL_ENTITY_WAS_FOUND, "account_logon")); Assert.IsNotNull(auditEventPolicyItem.account_management, string.Format(UNEXPECTED_NULL_ENTITY_WAS_FOUND, "account_management")); Assert.IsNotNull(auditEventPolicyItem.detailed_tracking, string.Format(UNEXPECTED_NULL_ENTITY_WAS_FOUND, "detailed_tracking")); Assert.IsNotNull(auditEventPolicyItem.directory_service_access, string.Format(UNEXPECTED_NULL_ENTITY_WAS_FOUND, "directory_service_access")); Assert.IsNotNull(auditEventPolicyItem.logon, string.Format(UNEXPECTED_NULL_ENTITY_WAS_FOUND, "logon")); Assert.IsNotNull(auditEventPolicyItem.object_access, string.Format(UNEXPECTED_NULL_ENTITY_WAS_FOUND, "object_access")); Assert.IsNotNull(auditEventPolicyItem.policy_change, string.Format(UNEXPECTED_NULL_ENTITY_WAS_FOUND, "policy_change")); Assert.IsNotNull(auditEventPolicyItem.privilege_use, string.Format(UNEXPECTED_NULL_ENTITY_WAS_FOUND, "privilege_use")); Assert.IsNotNull(auditEventPolicyItem.system, string.Format(UNEXPECTED_NULL_ENTITY_WAS_FOUND, "system")); if (withDefaultValue != AuditEventStatus.EMPTY) { Assert.AreEqual(withDefaultValue.ToString(), auditEventPolicyItem.account_logon.Value); Assert.AreEqual(withDefaultValue.ToString(), auditEventPolicyItem.account_management.Value); Assert.AreEqual(withDefaultValue.ToString(), auditEventPolicyItem.detailed_tracking.Value); Assert.AreEqual(withDefaultValue.ToString(), auditEventPolicyItem.directory_service_access.Value); Assert.AreEqual(withDefaultValue.ToString(), auditEventPolicyItem.logon.Value); Assert.AreEqual(withDefaultValue.ToString(), auditEventPolicyItem.object_access.Value); Assert.AreEqual(withDefaultValue.ToString(), auditEventPolicyItem.policy_change.Value); Assert.AreEqual(withDefaultValue.ToString(), auditEventPolicyItem.privilege_use.Value); Assert.AreEqual(withDefaultValue.ToString(), auditEventPolicyItem.system.Value); } }
private void SetEntityWithValue(EntityItemAuditType auditEventEntity, AuditEventStatus auditEventPolicyValue) { auditEventEntity.Value = auditEventPolicyValue.ToString(); }