public void TestMultiplyMethodWithTwoNegativeNumbers() { Calculator cal = new Calculator(); string z = "m"; double x = -2.0; double y = -3.0; double answer = x * y; double methodReturn = cal.DoOperation(x, y, z); Assert.AreEqual(answer, methodReturn); }
public void TestAddMethodWithTwoPositiveNumbers() { Calculator cal = new Calculator(); string z = "a"; double x = 2.0; double y = 3.0; double answer = x + y; double methodReturn = cal.DoOperation(x, y, z); Assert.AreEqual(answer, methodReturn); }
public void TestDivideMethodWithZeroAsDividendAndPositiveNumber() { Calculator cal = new Calculator(); string z = "d"; double x = 0.0; double y = 3.0; double answer = x / y; double methodReturn = cal.DoOperation(x, y, z); Assert.AreEqual(answer, methodReturn); }