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)); }
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); }