Example #1
0
 public bool Equals(CorrectSuperComplexClass other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     return(ReferenceEquals(this, other) || Equals(other.objectField, objectField));
 }
Example #2
0
        public void TestCorrectSuperComplexClass()
        {
            var obj1 = new CorrectSuperComplexClass(101, "abc");
            var obj2 = (CorrectSuperComplexClass)CloneUtils.genericClone(obj1);

            AssertAreEqualButNotSame(obj1, obj2);
            AssertAreEqualButNotSame(obj1.objectField, obj2.objectField);
            AssertAreEqualButNotSame(obj1.objectField.objectField.structValue, obj2.objectField.objectField.structValue);

            obj1.objectField.objectField.intValue = 303;
            Assert.AreEqual(101, obj2.objectField.objectField.intValue);
        }