public void EvaluateTest() { var expression = "2 + 3 * 10 - 4 / 2 + 4 * 3"; var expectedResult = 42; var actualResult = SMath.Evaluate(expression); Assert.AreEqual(expectedResult, actualResult); }
public void Evaluate_Static_API(string input, double variable, double expected) { SMath.SetValues(new VariablesCollection { ["b"] = 2, ["a"] = variable }); Assert.AreEqual(expected, SMath.Evaluate(input)); }