public void DivByZeroTest() { StupidCalculator stupidCalculator = new StupidCalculator(); int num1 = 6; int num2 = 0; Assert.ThrowsException <DivideByZeroException>(() => { var result = stupidCalculator.Div(num1, num2); }); }
public void DivTest() { StupidCalculator stupidCalculator = new StupidCalculator(); int num1 = 6; int num2 = 2; Assert.AreEqual(num1 / num2, stupidCalculator.Div(num1, num2)); }