示例#1
0
 public static void ExeptionDays()
 {            
     try
     {
         Rental rental = new Rental(movie, -2);
     }
     catch (DaysExeptions e)
     {
         Assert.AreEqual(e.Days, -2);
     }
     catch(Exception)
     {
         Assert.Fail();
     }
 }
示例#2
0
        public static void CreateMovie()
        {
            Rental rental = new Rental(movie, days: days);

            Assert.AreEqual(rental.CalculateDebt(), price * days);
        }