コード例 #1
0
 //[TestCase(0, )]
 public void DivTest(int number1, int number2, int expected)
 {
     try
     {
         Assert.AreEqual(expected, cl.Div(number1, number2));
     }
     catch (ArgumentException)
     {
         // Console.WriteLine("Division of by zero");
         Assert.Fail("Division By Zero is Undefined");
     }
 }
コード例 #2
0
 public void TestDiv(int a, int b, int expected)
 {
     try
     {
         int actual = calcMethods.Div(a, b);
         Assert.AreEqual(expected, actual);
     }
     catch (ArgumentException)
     {
         Assert.Fail("Divisio By Zero Not Possible");
     }
 }