Пример #1
0
        public void GreaterOperatorThrows()
        {
            Operator op = new GreaterOperator().Greater;

            MeVariable[] arr = { new MeString("test"), new MeNumber(10) };
            Assert.IsFalse(op.CanExecute(arr));
            TestUtils.CustomExceptionTest(() => op.Execute(arr), typeof(MeContextException));
        }
Пример #2
0
        public void GreaterOperatorCanCompare()
        {
            Operator op = new GreaterOperator().Greater;

            MeVariable[] arr = { new MeNumber(10), new MeNumber(20) };
            Assert.IsTrue(op.CanExecute(arr));
            bool result = op.Execute(arr).Get <bool>();

            Assert.AreEqual(false, result);
        }