Пример #1
0
        public void TestDiscreteCtor()
        {
            DbGuid testA = new DbGuid(0x01020304, 0x0506, 0x0708, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80);
            Guid   testB = new Guid(0x01020304, 0x0506, 0x0708, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80);

            Assert.AreEqual(testB, testA.ToGuid());
        }
Пример #2
0
        public void GuidCompare()
        {
            DbGuid a = DbGuid.NewGuid();
            DbGuid b = DbGuid.NewGuid();

            Assert.AreEqual(-1, a.CompareTo(b));
            Assert.AreEqual(-1, a.ToGuid().CompareTo(b.ToGuid()));
        }
Пример #3
0
        public void TestRoundTripGuidToDbGuid()
        {
            Guid   testA  = Guid.NewGuid();
            DbGuid dbtest = (DbGuid)testA;
            Guid   testB  = dbtest.ToGuid();

            Assert.AreEqual(testA, testB);
        }
Пример #4
0
 public void TestDiscreteCtor()
 {
     DbGuid testA = new DbGuid(0x01020304, 0x0506, 0x0708, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80);
     Guid testB = new Guid(0x01020304, 0x0506, 0x0708, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80);
     Assert.AreEqual(testB, testA.ToGuid());
 }