Example #1
0
        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));
        }
Example #2
0
        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);
        }