Exemplo n.º 1
0
        public void TwoGDIDWithISOKey_CreateNotEquate_2()
        {
            var k1 = new TwoGDIDWithISOKey(new GDID(10, 20), new GDID(10, 30), "eng");
            var k2 = new TwoGDIDWithISOKey(new GDID(10, 20), new GDID(10, 30), "fra");

            Aver.AreNotEqual(k1, k2);

            Aver.IsFalse(k1.Equals(k2));
            var o = k2;

            Aver.IsFalse(k1.Equals(o));

            Aver.AreNotEqual(k1.GetHashCode(), k2.GetHashCode());
            Aver.AreNotEqual(k1.GetDistributedStableHash(), k2.GetDistributedStableHash());
            Console.WriteLine(k1.ToString());
        }
Exemplo n.º 2
0
        public void TwoGDIDWithISOKey_CreateEquate_3()
        {
            var k1 = new TwoGDIDWithISOKey(new GDID(10, 20), new GDID(10, 30), "ua");
            var k2 = new TwoGDIDWithISOKey(new GDID(10, 20), new GDID(10, 30), "UA");

            Aver.AreEqual("UA", k1.ISOCode);
            Aver.AreEqual("UA", k2.ISOCode);
            Aver.AreEqual(k1, k2);

            Aver.IsTrue(k1.Equals(k2));
            var o = k2;

            Aver.IsTrue(k1.Equals(o));

            Aver.AreEqual(k1.GetHashCode(), k2.GetHashCode());
            Aver.AreEqual(k1.GetDistributedStableHash(), k2.GetDistributedStableHash());
            Console.WriteLine(k1.ToString());
        }
Exemplo n.º 3
0
        public void TwoGDIDWithISOKey_CreateNotEquate_2()
        {
            var k1 = new TwoGDIDWithISOKey(new GDID(10, 20), new GDID(10, 30), "eng");
            var k2 = new TwoGDIDWithISOKey(new GDID(10, 20), new GDID(10, 30), "fra");
            Assert.AreNotEqual(k1, k2);

            Assert.IsFalse(k1.Equals(k2));
            var o = k2;
            Assert.IsFalse(k1.Equals(o));

            Assert.AreNotEqual(k1.GetHashCode(), k2.GetHashCode());
            Assert.AreNotEqual(k1.GetDistributedStableHash(), k2.GetDistributedStableHash());
            Console.WriteLine(k1.ToString());
        }
Exemplo n.º 4
0
        public void TwoGDIDWithISOKey_CreateEquate_3()
        {
            var k1 = new TwoGDIDWithISOKey(new GDID(10, 20), new GDID(10, 30), "ua");
            var k2 = new TwoGDIDWithISOKey(new GDID(10, 20), new GDID(10, 30), "UA");
            Assert.AreEqual("UA", k1.ISOCode);
            Assert.AreEqual("UA", k2.ISOCode);
            Assert.AreEqual(k1, k2);

            Assert.IsTrue(k1.Equals(k2));
            var o = k2;
            Assert.IsTrue(k1.Equals(o));

            Assert.AreEqual(k1.GetHashCode(), k2.GetHashCode());
            Assert.AreEqual(k1.GetDistributedStableHash(), k2.GetDistributedStableHash());
            Console.WriteLine(k1.ToString());
        }