public void should_return_correct_value_when_partly_simplified(string stringToParse, double expectedValue) { var partlySimplifiedParsedFunction = new ParsedFunction(); partlySimplifiedParsedFunction.UpdateFrom(sut); partlySimplifiedParsedFunction.StringToParse = stringToParse; partlySimplifiedParsedFunction.SetParametersNotToSimplify(new[] { "p1" }); partlySimplifiedParsedFunction.CalcExpression(_arguments).ShouldBeEqualTo(expectedValue); }
public void should_return_correct_value_when_not_simplified(string stringToParse, double expectedValue) { var notSimplifiedParsedFunction = new ParsedFunction(); notSimplifiedParsedFunction.UpdateFrom(sut); notSimplifiedParsedFunction.SimplifyParametersAllowed = false; notSimplifiedParsedFunction.StringToParse = stringToParse; notSimplifiedParsedFunction.CalcExpression(_arguments).ShouldBeEqualTo(expectedValue); }