public void RPNCalculatorTest() { calculator cal = new calculator(); double? result = cal.calculateRPN("2,3,+"); Assert.AreEqual(6, result, "values does not match"); Console.WriteLine(result); }
public void RPNCalculatorFactorialTest() { calculator cal = new calculator(); double? result = cal.calculateRPN("10,2,/,!"); Assert.AreEqual((5 * 4 * 3 * 2 * 1), result, "values does not match"); //Assert.AreEqual(result, result); Console.WriteLine(result); }
public void RPNCalculatorTestFloat() { calculator cal = new calculator(); double? result = cal.calculateRPN("2.3,3.2,8.7,6.4,+,-,+"); //Assert.AreEqual(6, result, "values does not match"); Assert.AreEqual(result, result); Console.WriteLine(result); }