Example #1
0
        public void T7()
        {
            var tran = new LockTransaction("Testing 101", "A", 0, 0.0d,
                                           LockOp.Assert(LockOp.Xor(LockOp.True, LockOp.False)) //assert(true ^ false) must pass
                                           );

            var session = new Agni.Locking.Server.LockSessionData(new LockSessionID(null), "My session", 1000);
            var result  = m_Server.ExecuteLockTransaction(session, tran);

            Aver.IsTrue(LockStatus.TransactionOK == result.Status);
        }
Example #2
0
        public void T9()
        {
            var tran = new LockTransaction("Testing 101", "A", 0, 0.0d,
                                           LockOp.Assert(LockOp.Xor(LockOp.False, LockOp.False)) //assert(false ^ false) must fail
                                           );

            var session = new Agni.Locking.Server.LockSessionData(new LockSessionID(null), "My session", 1000);
            var result  = m_Server.ExecuteLockTransaction(session, tran);

            Aver.IsTrue(LockStatus.TransactionError == result.Status);
            Aver.IsTrue(LockErrorCause.Statement == result.ErrorCause);
            Aver.AreEqual("0:/AssertOp/", result.FailedStatement);
        }