Esempio n. 1
0
 private void MustFail <T>(Action func, IComparable <String> aStringDescribingFailure, CustomerBook customerBook) where T : Exception
 {
     try
     {
         func();
         Assert.Fail();
     }
     catch (T e)
     {
         Assert.AreEqual(e.Message, aStringDescribingFailure);
         Assert.IsTrue(customerBook.isEmpty());
     }
 }
Esempio n. 2
0
 private void CheckErrorMessageAndEmptyCustomer(String expectedMessage, CustomerBook customerBook, Exception exception)
 {
     Assert.AreEqual(expectedMessage, exception.Message);
     Assert.IsTrue(customerBook.isEmpty());
 }
 public void CheckIfCustomerBookIsEmpty(CustomerBook customerBook)
 {
     Assert.IsTrue(customerBook.isEmpty());
 }