예제 #1
0
        public void CtorWithPolicyCopiesProperties()
        {
            // Arrange
            var policy = new UserSecurityPolicy("A", "B", "C");

            // Act
            var copy = new UserSecurityPolicy(policy);

            // Assert
            Assert.Equal(policy.Name, copy.Name);
            Assert.Equal(policy.Subscription, copy.Subscription);
            Assert.Equal(policy.Value, copy.Value);
        }
예제 #2
0
 public void EqualsReturnsFalseForPolicyNonMatches(UserSecurityPolicy first, UserSecurityPolicy second)
 {
     // Act & Assert
     Assert.False(first.Equals(second));
 }
예제 #3
0
 public void EqualsReturnsTrueForPolicyMatches(UserSecurityPolicy first, UserSecurityPolicy second)
 {
     // Act & Assert
     Assert.True(first.Equals(second));
 }