public void DataTableExpressionCalculator_ValidExpression_GivesCorrectResult(string expression, double expected)
        {
            var calculator      = DatatableExpressionCalculator.Create();
            var expressionValue = calculator.Evaluate(expression);

            Assert.Equal(expected, Math.Round(expressionValue, 6));
        }
        public void DataTableExpressionCalculator_IncorrectSyntax_ThrowsException(string expression)
        {
            var calculator = DatatableExpressionCalculator.Create();

            Assert.Throws <SyntaxErrorException>(() => calculator.Evaluate(expression));
        }
        public void DataTableExpressionCalculator_InvalidExpression_ThrowsException(string expression)
        {
            var calculator = DatatableExpressionCalculator.Create();

            Assert.Throws <EvaluateException>(() => calculator.Evaluate(expression));
        }