public void TestMethodDivision() { Assert.AreEqual(CalculatorClass.Division(5, 5), 1); Assert.AreEqual(CalculatorClass.Division(10, 5), 2); Assert.AreEqual(CalculatorClass.Division(0, 5), 0); //need write for exeption Method to this //Assert.AreEqual(CalculatorClass.Division(5, 0), 0); }
public void Divide02() { ICalculator divide = new CalculatorClass(); double value1 = 5; double value2 = 8.7; double expectedResult = divide.Division(value1, value2); Assert.That(expectedResult, Is.EqualTo(43.5)); }
public void Divide01() { ICalculator divide = new CalculatorClass(); double value1 = 125; double value2 = 5; double actual = 25; double tolerance = 0.001; double expectedResult = divide.Division(value1, value2); Assert.AreEqual(expectedResult, actual, tolerance); }