public void TestDivision_WithException() { // arrange int op1 = 100; int op2 = 0; ALU alu = new ALU(); // act int actual = alu.Divide(op1, op2); // assert is handled by ExpectedException }
public void TestDivision() { // arrange int op1 = 100; int op2 = 5; int expected = 20; ALU alu = new ALU(); // act int actual = alu.Divide(op1, op2); // assert Assert.AreEqual(expected, actual, 0.001, "Division failed."); }