DeepEquals() public méthode

Determins if this equals that by performing a deep equals looking at all elements of all member listsand objects.
public DeepEquals ( Activity that ) : bool
that Activity The object to compare for equality.
Résultat bool
        private void TestDeepEquals(Activity objectA, Activity objectB, bool expect, bool expectDeep)
        {
            objectA.At = objectB.At;

            Assert.AreEqual(expectDeep, objectA.DeepEquals(objectB));
            Assert.AreEqual(expectDeep, objectB.DeepEquals(objectA));
            Assert.AreEqual(expect, objectA.Equals(objectB));
            Assert.AreEqual(expect, objectB.Equals(objectA));
        }
        public void TestActivityDeserialize_02()
        {
            DateTime date = new DateTime(2002, 1, 1);

            Activity activity = new Activity(date, "action 1");

            string str = XmlHelper.Instance.ToXmlString<Activity>(activity);
            Activity des = XmlHelper.Instance.FromXmlString<Activity>(str);
            Assert.IsTrue(activity.DeepEquals(des));
        }