public void GetPath_ReturnsLowercaseUserPath()
        {
            // Act.
            var record = new UserSecurityPolicyAuditRecord("D",
                                                           AuditedSecurityPolicyAction.Verify, Policies, success: true);

            // Assert.
            Assert.Equal("d", record.GetPath());
        }
        public void Constructor_SetsPropertiesForSuccess()
        {
            // Act.
            var record = new UserSecurityPolicyAuditRecord("D",
                                                           AuditedSecurityPolicyAction.Verify, Policies, success: true);

            // Assert.
            Assert.Equal("D", record.Username);
            Assert.True(record.Success);
            Assert.Null(record.ErrorMessage);
            Assert.Single(record.AffectedPolicies);
            Assert.Equal("A", record.AffectedPolicies[0].Name);
            Assert.Equal("B", record.AffectedPolicies[0].Subscription);
            Assert.Equal("C", record.AffectedPolicies[0].Value);
        }
        public void Constructor_SetsPropertiesForNonSuccess()
        {
            // Act.
            var record = new UserSecurityPolicyAuditRecord("D",
                                                           AuditedSecurityPolicyAction.Verify, Policies, success: false, errorMessage: "E");

            // Assert.
            Assert.Equal("D", record.Username);
            Assert.False(record.Success);
            Assert.Equal("E", record.ErrorMessage);
            Assert.Equal(1, record.AffectedPolicies.Length);
            Assert.Equal("A", record.AffectedPolicies[0].Name);
            Assert.Equal("B", record.AffectedPolicies[0].Subscription);
            Assert.Equal("C", record.AffectedPolicies[0].Value);
        }