public static void RemoveItens()
 {
     ValidityControl.UpdateListDatesFromDB();
     foreach (ValidityDateControl tmp in ValidityControl.GetListDates())
     {
         ValidityDateControlModel.Delete(tmp);
     }
     ValidityControl.ClearListDates();
 }
        public void UpdateListTest()
        {
            ValidityControl.ClearListDates();
            ValidityDateControl date = new ValidityDateControl(5, new DateTime(1991, 9, 24, 0, 0, 0), new DateTime(2017, 10, 10, 23, 59, 59));

            ValidityControl.AddDateControl(date);
            ValidityControl.ClearListDates();
            ValidityControl.UpdateListDatesFromDB();
            ValidityDateControl dateItem = ValidityControl.GetListDates()[0];

            Assert.IsTrue(date.IsSameDate(dateItem));
        }
 public void GetPriceByDateRaiseExceptionTest()
 {
     ValidityControl.ClearListDates();
     try
     {
         ValidityControl.GetPriceByDate(new DateTime(2015, 8, 17, 0, 0, 0));
         Assert.Fail("Não lançou a exception");
     }
     catch (NotFoundDateControl e)
     {
         Assert.IsTrue(true);
     }
 }
Ejemplo n.º 4
0
 public void init()
 {
     ValidityControl.ClearListDates();
 }