Пример #1
0
        public void GDIDWithISOKey_CreateNotEquate_1()
        {
            var k1 = new GDIDWithISOKey(new GDID(10, 20), "eng");
            var k2 = new GDIDWithISOKey(new GDID(10, 21), "eNG");

            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());
        }
Пример #2
0
        public void GDIDWithISOKey_CreateEquate_2()
        {
            var k1 = new GDIDWithISOKey(new GDID(10, 20), "ua");
            var k2 = new GDIDWithISOKey(new GDID(10, 20), "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());
        }
Пример #3
0
 public void GDIDWithISOKey_BadCtor_1()
 {
     var k = new GDIDWithISOKey(new GDID(10, 20), "ertewrtewrte");
 }
Пример #4
0
 public void GDIDWithISOKey_BadCtor_1()
 {
     var k = new GDIDWithISOKey(new GDID(10, 20), null);
 }
Пример #5
0
 public void GDIDWithISOKey_BadCtor_2()
 {
     var k = new GDIDWithISOKey(new GDID(10, 20), "");
 }
Пример #6
0
        public void GDIDWithISOKey_CreateNotEquate_3()
        {
            var k1 = new GDIDWithISOKey(new GDID(10, 20), "en");
            var k2 = new GDIDWithISOKey(new GDID(10, 20), "fr");
            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());
        }
Пример #7
0
        public void GDIDWithISOKey_CreateEquate_2()
        {
            var k1 = new GDIDWithISOKey(new GDID(10, 20), "ua");
            var k2 = new GDIDWithISOKey(new GDID(10, 20), "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());
        }
Пример #8
0
 public void GDIDWithISOKey_BadCtor_3()
 {
     var k = new GDIDWithISOKey(new GDID(10, 20), "ertewrtewrte");
 }
Пример #9
0
 public void GDIDWithISOKey_BadCtor_2()
 {
     var k = new GDIDWithISOKey(new GDID(10, 20), "");
 }
Пример #10
0
 public void GDIDWithISOKey_BadCtor_1()
 {
     var k = new GDIDWithISOKey(new GDID(10, 20), null);
 }