DeepEquals() публичный Метод

Determins if this equals that by performing a deep equals looking at all elements of all member listsand objects.
public DeepEquals ( GnipUrl that ) : bool
that GnipUrl The object to compare for equality.
Результат bool
Пример #1
0
        public void TestGnipUrlDeserialize_01()
        {
            GnipUrl gnipUrl = new GnipUrl(
                "url 1",
                "metaUrl 1");

            string str = XmlHelper.Instance.ToXmlString<GnipUrl>(gnipUrl);

            GnipUrl des = XmlHelper.Instance.FromXmlString<GnipUrl>(str);
            Assert.IsTrue(gnipUrl.DeepEquals(des));
        }
Пример #2
0
        public void TestGnipUrlConstructor_01()
        {
            GnipUrl gnipUrl = new GnipUrl();
            gnipUrl.MetaUrl = "metaUrl 1";
            gnipUrl.Url = "url 1";

            GnipUrl gnipUrl2 = new GnipUrl(
                "url 1",
                "metaUrl 1");

            Assert.IsTrue(gnipUrl.DeepEquals(gnipUrl2));
        }
Пример #3
0
 private void TestDeepEquals(GnipUrl objectA, GnipUrl objectB, bool expect, bool expectDeep)
 {
     Assert.AreEqual(expectDeep, objectA.DeepEquals(objectB));
     Assert.AreEqual(expectDeep, objectB.DeepEquals(objectA));
     Assert.AreEqual(expect, objectA.Equals(objectB));
     Assert.AreEqual(expect, objectB.Equals(objectA));
 }