public void BracketWithNoClosingPrimary() { // SETUP var input = "4/(3+8"; var expectedResult = new FormatException(); var calc = new Calculator_Core(); calc.SetInput(input); // EXECUTE calc.Expression(); }
public void DivisionThenAddition() { // SETUP var input = "20/5+25"; double expectedResult = 4; var calc = new Calculator_Core(); calc.SetInput(input); // EXECUTE var termResult = calc.Term(); // ASSERT Assert.AreEqual(expectedResult, termResult); }
public void NumericalPrimary() { // SETUP var input = "25"; double expectedResult = 25; var calc = new Calculator_Core(); calc.SetInput(input); // EXECUTE var numericPrimary = calc.Primary(); // ASSERT Assert.AreEqual(expectedResult, numericPrimary); }