DeepEquals() 공개 메소드

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.
리턴 bool
예제 #1
0
        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));
        }
예제 #2
0
        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));
        }