예제 #1
0
        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);
        }
예제 #2
0
        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);
        }