Пример #1
0
        public void VerifyJetCommitIdInequality()
        {
            DateTime      d         = DateTime.Now;
            JET_COMMIT_ID commitId1 = DurableCommitTests.CreateJetCommitId(1, d, "computer", 2);
            JET_COMMIT_ID commitId2 = DurableCommitTests.CreateJetCommitId(1, d, "computer", 3);

            Assert.IsFalse(commitId1 == commitId2);
            Assert.IsTrue(commitId1.GetHashCode() != commitId2.GetHashCode());
            Assert.IsFalse(commitId1.Equals(commitId2));
            Assert.IsTrue(commitId1 != commitId2);
            Assert.IsTrue(commitId1 <= commitId2);
            Assert.IsTrue(commitId1 < commitId2);
            Assert.IsFalse(commitId1 >= commitId2);
            Assert.IsFalse(commitId1 > commitId2);
        }
        public void VerifyJetCommitIdEqualityToWrongTypeIsFalse()
        {
            var sigX = new NATIVE_SIGNATURE()
            {
                ulRandom       = 1,
                logtimeCreate  = Any.Logtime,
                szComputerName = "Komputer",
            };

            var x = new JET_COMMIT_ID(new NATIVE_COMMIT_ID()
            {
                signLog  = sigX,
                commitId = 123,
            });

            Assert.IsFalse(x.Equals(sigX));
        }