public void SlowPathEqual() { var comparer = new ShallowPropertyEqualityComparer <SlowPathTestClass>(); Assert.IsTrue(comparer.Equals(new SlowPathTestClass(), new SlowPathTestClass())); Assert.IsTrue(comparer.Equals(null, null)); Assert.IsTrue(comparer.Equals(new SlowPathTestClass { Number = 5 }, new SlowPathTestClass { Number = 5 })); Assert.IsTrue(comparer.Equals(new SlowPathTestClass { Test = "ABC" }, new SlowPathTestClass { Test = "ABC" })); Assert.IsTrue(comparer.Equals(new SlowPathTestClass { Number = 1, Test = "Foo" }, new SlowPathTestClass { Number = 1, Test = "Foo" })); }
public void SlowPathNotEqual() { var comparer = new ShallowPropertyEqualityComparer <SlowPathTestClass>(); Assert.IsFalse(comparer.Equals(new SlowPathTestClass(), null)); Assert.IsFalse(comparer.Equals(null, new SlowPathTestClass())); Assert.IsFalse(comparer.Equals(new SlowPathTestClass { Number = 5 }, new SlowPathTestClass { Number = 10 })); Assert.IsFalse(comparer.Equals(new SlowPathTestClass { Test = "FOO" }, new SlowPathTestClass { Test = "BAR" })); }