예제 #1
0
        public void IgnoreSpecificProperties()
        {
            comparer.Ignore <NonBuiltInClass, string>(x => x.TheValue);

            var object1 = new NonBuiltInClass();
            var object2 = new NonBuiltInClass();

            object1.TheValue = "Something";
            object2.TheValue = "SomethingElse";

            var result = comparer.AreEqual(object1, object2);

            Assert.IsTrue(result.AreEqual, "Objects should be equal despite ignored property being different.");
        }