Example #1
0
        public void T24()
        {
            var tran = new LockTransaction("Testing 101", "A", 0, 0.0d,
                                           LockOp.Block(
                                               LockOp.SelectConstantValue("A", 123),
                                               LockOp.If(
                                                   LockOp.False,//condition
                                                   LockOp.SelectConstantValue("B", "THEN"),
                                                   LockOp.Abort()
                                                   )//if
                                               )
                                           );

            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:/BlockOp/IfOp/AbortOp/", result.FailedStatement);
        }