private void TestThatOperatorYields(Operator op, string input, string expectedResult) { var operand = new StringLiteral(input); var expr = new OperatorExpression(op, operand); expr.TryEvaluate(EmptyEnvironment, out string actualResult).Should().BeTrue(); actualResult.Should().Be(expectedResult); }
public void TestThatEvalFailsIfInnerExpressionCannotBeEvaluated() { var concat = new OperatorExpression(AnyValidOperator, AnyUnevaluatableExpr); concat.TryEvaluate(EmptyEnvironment, out string value).Should().BeFalse(); }