Esempio n. 1
0
        public void DatedGDIDWithISOKey_CreateEquate_2()
        {
            var dt = new DateTime(1980, 10, 2, 0, 0, 0, DateTimeKind.Utc);

            var k1 = new DatedGDIDWithISOKey(dt, new GDID(10, 20), "ua");
            var k2 = new DatedGDIDWithISOKey(dt, 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());
        }
Esempio n. 2
0
 public void DatedGDIDWithISOKey_BadCtor_1()
 {
     var k = new DatedGDIDWithISOKey(DateTime.Now, new GDID(10, 20), "ertewrtewrte");
 }
Esempio n. 3
0
        public void DatedGDIDWithISOKey_CreateNotEquate_3()
        {
            var dt1 = new DateTime(1980, 10, 2, 0, 0, 0, DateTimeKind.Utc);
            var dt2 = new DateTime(1980, 10, 3, 0, 0, 0, DateTimeKind.Utc);

            var k1 = new DatedGDIDWithISOKey(dt1, new GDID(10, 20), "en");
            var k2 = new DatedGDIDWithISOKey(dt2, new GDID(10, 20), "en");
            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());
        }
Esempio n. 4
0
        public void DatedGDIDWithISOKey_CreateEquate_2()
        {
            var dt = new DateTime(1980, 10, 2, 0, 0, 0, DateTimeKind.Utc);

            var k1 = new DatedGDIDWithISOKey(dt, new GDID(10, 20), "ua");
            var k2 = new DatedGDIDWithISOKey(dt, 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());
        }
Esempio n. 5
0
 public void DatedGDIDWithISOKey_BadCtor_3()
 {
     var k = new DatedGDIDWithISOKey(DateTime.Now, new GDID(10, 20), "ertewrtewrte");
 }
Esempio n. 6
0
 public void DatedGDIDWithISOKey_BadCtor_1()
 {
     var k = new DatedGDIDWithISOKey(DateTime.Now, new GDID(10, 20), null);
 }