Example #1
0
        public void TestIEquatable()
        {
            var o1 = new InfoA {
                Age = 10
            };
            Object o2 = new InfoA {
                Age = 10
            };
            var o3 = (InfoA)o2;

            Assert.That(o1.Equals(o2), Is.True);
            Assert.That(o1.Equals(o3), Is.True);
        }
Example #2
0
        public void TestObjectEqual()
        {
            var o1 = new InfoA {
                Age = 1
            };
            var o2 = new InfoA {
                Age = 2
            };
            var o3 = new InfoA {
                Age = 2
            };

            Assert.That(o1.Equals(o2), Is.False);
            Assert.That(o2.Equals(o3), Is.True);
        }