public void CreateUnaryExpression() { IExpression valueExpression = new ConstantExpression(1); UnaryExpression expression = new ArithmeticUnaryExpression(ArithmeticOperator.Minus, valueExpression); Assert.IsTrue(expression.Expression == valueExpression); }
private static object EvaluateArithmeticUnaryOperator(ArithmeticOperator operation, object value) { IExpression expression = new ArithmeticUnaryExpression(operation, new ConstantExpression(value)); return expression.Evaluate(null); }