public void Calculation_GivenZero_ReturnException() { //Arrange int num1 = 100; int num2 = 0; var calService = new CalculationService(); //Act Assert.Throws <DivideByZeroException>(() => calService.DivideNumbers(num1, num2)); }
public void Calculation_GivenTwoNumbers_ReturnDivide(int num1, int num2, int expected) { //Arrange var calService = new CalculationService(); //Act var result = calService.DivideNumbers(num1, num2); //Assert Assert.Equal(expected, result); }