Пример #1
0
        public void WithoutOverridenOpEq()
        {
            var  aa = new BasicWithOverridenEquals(42);
            var  bb = new BasicWithOverridenEquals(42);
            bool bl = aa == bb;

            Assert.False(bl);
        }
Пример #2
0
        public void WithOverridenEquals()
        {
            var  aa = new BasicWithOverridenEquals(42);
            var  bb = new BasicWithOverridenEquals(42);
            bool bl = aa.Equals(bb);

            Assert.True(bl);
        }
Пример #3
0
 protected bool Equals(BasicWithOverridenEquals other)
 {
     return(Val == other.Val);
 }