コード例 #1
0
        public void IntShouldIgnore()
        {
            HasInt actual = new HasInt {
                TheValue = 5
            };
            HasInt expected = new HasInt {
                TheValue = 4
            };
            var constraint = Constraints.PropertyCompareConstraint(expected).IgnoreProperty(x => x.TheValue);

            Assert.That(constraint.Matches(actual), Is.True);
        }
コード例 #2
0
        public void IntShouldNotMatch()
        {
            HasInt actual = new HasInt {
                TheValue = 5
            };
            HasInt expected = new HasInt {
                TheValue = 4
            };
            var constraint = Constraints.PropertyCompareConstraint(expected);

            Assert.That(constraint.Matches(actual), Is.False);
        }