Ejemplo n.º 1
0
        public virtual void TestNotEquals_DiffLength()
        {
            string sa             = "7b6e8067abcd";
            string sb             = "7b6e8067";
            AbbreviatedObjectId a = AbbreviatedObjectId.FromString(sa);
            AbbreviatedObjectId b = AbbreviatedObjectId.FromString(sb);

            NUnit.Framework.Assert.IsFalse(a.Equals(b));
            NUnit.Framework.Assert.IsFalse(b.Equals(a));
        }
Ejemplo n.º 2
0
        public virtual void TestEquals_Full()
        {
            string s = "7b6e8067ec96acef9a4184b43210d583b6d2f99a";
            AbbreviatedObjectId a = AbbreviatedObjectId.FromString(s);
            AbbreviatedObjectId b = AbbreviatedObjectId.FromString(s);

            NUnit.Framework.Assert.AreNotSame(a, b);
            NUnit.Framework.Assert.IsTrue(a.GetHashCode() == b.GetHashCode());
            NUnit.Framework.Assert.IsTrue(a.Equals(b));
            NUnit.Framework.Assert.IsTrue(b.Equals(a));
        }
Ejemplo n.º 3
0
        public virtual void TestEquals_Short()
        {
            string s = "7b6e8067";
            AbbreviatedObjectId a = AbbreviatedObjectId.FromString(s);
            AbbreviatedObjectId b = AbbreviatedObjectId.FromString(s);

            NUnit.Framework.Assert.AreNotSame(a, b);
            NUnit.Framework.Assert.IsTrue(a.GetHashCode() == b.GetHashCode());
            NUnit.Framework.Assert.IsTrue(a.Equals(b));
            NUnit.Framework.Assert.IsTrue(b.Equals(a));
        }