Exemple #1
0
 public void WhenCalendarHasANonWorkingDayOfWeekReturnsNonWorkingForThatDayOfWeekAndFalseForAnotherOne()
 {
     WorkingDatesCalendar argentineCalendar = new WorkingDatesCalendar();
     argentineCalendar.AddNonWorkingDayOfWeek(DayOfWeek.Sunday);
     Assert.IsFalse(argentineCalendar.IsNonWorkingDate(someSaturday()));
     Assert.IsTrue(argentineCalendar.IsNonWorkingDate(someSunday()));
 }
Exemple #2
0
 public void WhenCalendarHasTwoNonWorkingDayOfWeekAndReturnsNonWorkingForThoseDays()
 {
     WorkingDatesCalendar argentineCalendar = new WorkingDatesCalendar();
     argentineCalendar.AddNonWorkingDayOfWeek(DayOfWeek.Saturday);
     argentineCalendar.AddNonWorkingDayOfWeek(DayOfWeek.Sunday);
     Assert.IsTrue(argentineCalendar.IsNonWorkingDate(someSaturday()));
     Assert.IsTrue(argentineCalendar.IsNonWorkingDate(someSunday()));
 }
Exemple #3
0
 public void WhenCalendarHasTwoNonWorkingDayOfMonthThoseDaysAreNonWorkingDate()
 {
     WorkingDatesCalendar argentineCalendar = new WorkingDatesCalendar();
     argentineCalendar.AddNonWorkingDayOfMonth(someJanuaryFirst());
     argentineCalendar.AddNonWorkingDayOfMonth(someChrismas());
     Assert.IsFalse(argentineCalendar.IsNonWorkingDate(someNotJanuaryFirst()));
 }
Exemple #4
0
 public void WhenCalendarHasANonWorkingDayOfWeekReturnsItIsNotNonWorkingDayForOtherDay()
 {
     WorkingDatesCalendar argentineCalendar = new WorkingDatesCalendar();
     argentineCalendar.AddNonWorkingDayOfWeek(DayOfWeek.Sunday);
     Assert.IsFalse(argentineCalendar.IsNonWorkingDate(someMonday()));
 }
Exemple #5
0
 public void WhenCalendarHasANonWorkingDayOfMonthThatDayIsNonWorkingDate()
 {
     WorkingDatesCalendar argentineCalendar = new WorkingDatesCalendar();
     argentineCalendar.AddNonWorkingDayOfMonth(someJanuaryFirst());
     Assert.IsTrue(argentineCalendar.IsNonWorkingDate(someJanuaryFirst()));
 }
Exemple #6
0
 public void Test6()
 {
     WorkingDatesCalendar argentineCalendar = new WorkingDatesCalendar();
     argentineCalendar.AddNonWorkingDayOfMonth(someJanuaryFirst());
     Assert.IsFalse(argentineCalendar.IsNonWorkingDate(someNotJanuaryFirst()));
 }