public void DivideByZeroTest() { //Arrange double num1 = 550; double num2 = 0; CalcOperations calc = new CalcOperations(); //Act & Assert Assert.ThrowsException <DivideByZeroException>(() => calc.Divide(num1, num2)); }
public void DivideTest() { //Arrange double num1 = 550; double num2 = 2; double expected = 275; CalcOperations calc = new CalcOperations(); //Act double actual = calc.Divide(num1, num2); //Assert Assert.AreEqual(expected, actual); }