public void Solve_SquareRoots() { var equation = "@(64)"; var expected = "8"; var actual = Calculator.Solve(equation); Assert.AreEqual(expected, actual); }
public void Solve_Exponants() { var equation = "3^5"; var expected = "243"; var actual = Calculator.Solve(equation); Assert.AreEqual(expected, actual); }
public void Solve_PiGetsConverted() { Assert.AreEqual("10.2", Calculator.Solve("3.2+7")); Assert.AreEqual("9.42477796076938", Calculator.Solve("3*#")); }
public void Solve_ExceptionOnDivisionByZero() => Calculator.Solve("321/(3-3)");
public void Solve_DivisionMultiplicationAdditionSubtraction(string equation, string expected) { var actual = Calculator.Solve(equation); Assert.AreEqual(expected, actual); }
public void Solve_BracketEquations(string equation, string expected) { var actual = Calculator.Solve(equation); Assert.AreEqual(expected, actual); }