Пример #1
0
 public void DivideBy0()
 {
     try
     {
         DivideSample.Divide(10, 0);
         Assert.Fail("Should throw exception");
     }
     catch (Exception ex)
     {
         Debug.WriteLine(ex.FullMessage());
         Assert.IsInstanceOfType(ex, typeof(ApplicationException));
     }
 }
Пример #2
0
 public void DivideBy1()
 {
     Assert.AreEqual(10, DivideSample.Divide(10, 1));
 }