public void NotOperatorThrows() { Operator op = new NotOperator().Not; MeVariable[] arr = { new MeString("test") }; Assert.IsFalse(op.CanExecute(arr)); TestUtils.CustomExceptionTest(() => op.Execute(arr), typeof(MeContextException)); }
public void NotOperatorCanReverse() { Operator op = new NotOperator().Not; MeVariable[] arr = { new MeBoolean(true) }; Assert.IsTrue(op.CanExecute(arr)); bool result = op.Execute(arr).Get <bool>(); Assert.AreEqual(false, result); }