public void testInvalidInput2() { Calculator.Request req = new Calculator.Request(); bool valid = req.setValue("4 x 0 +"); Assert.AreEqual(false, valid); }
public void testTime() { Calculator.Request req = new Calculator.Request(); req.setValue("4 * 5"); double ans = req.getResult(); Assert.AreEqual(20, ans); }
public void testDivide1() { Calculator.Request req = new Calculator.Request(); req.setValue("4 / 5"); double ans = req.getResult(); Assert.AreEqual(0.8, ans); }
public void testMinus() { Calculator.Request req = new Calculator.Request(); req.setValue("4 - 5"); double ans = req.getResult(); Assert.AreEqual(-1, ans); }
public void testInvalidInput3() { Calculator.Request req = new Calculator.Request(); req.setValue("4 x +"); double ans = req.getResult(); bool valid = req.getValid(); Assert.AreEqual(0, ans); Assert.AreEqual(false, valid); }