public void T21() { var tran = new LockTransaction("Testing 101", "A", 0, 0.0d, LockOp.Block( LockOp.SelectOperatorValue("A", LockOp.True), LockOp.SelectOperatorValue("B", LockOp.Not(LockOp.True) )) ); 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); Aver.IsTrue(result["A"].AsBool()); Aver.IsFalse(result["B"].AsBool()); }
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); }