private void TestHoliday(Holiday holiday, DateTime dateOnGregorian)
 {
     var holidayInstance = holiday.GetInstance(dateOnGregorian.Year);
     Assert.IsTrue(holidayInstance.HasValue);
     Assert.AreEqual(dateOnGregorian, holidayInstance.Value);
     Assert.IsTrue(holiday.IsInstanceOf(dateOnGregorian));
 }
 public NthDayOfWeekAfterDayHoliday(string name, int count, DayOfWeek dayOfWeek, Holiday baseHoliday)
     : base(name)
 {
     if (count == 0) {
         throw new ArgumentException("count must not be 0", "count");
     }
     if (baseHoliday == null) {
         throw new ArgumentException("baseHoliday cannot be null", "baseHoliday");
     }
     this.count = count;
     this.dayOfWeek = dayOfWeek;
     this.baseHoliday = baseHoliday;
     dayCache = new Dictionary<int, DateTime?>();
 }
 public NthDayOfWeekAfterDayHoliday(string name, int count, DayOfWeek dayOfWeek, Holiday baseHoliday)
     : base(name)
 {
     if (count == 0)
     {
         throw new ArgumentException("count must not be 0", "count");
     }
     if (baseHoliday == null)
     {
         throw new ArgumentException("baseHoliday cannot be null", "baseHoliday");
     }
     this.count       = count;
     this.dayOfWeek   = dayOfWeek;
     this.baseHoliday = baseHoliday;
     dayCache         = new Dictionary <int, DateTime?>();
 }
 public YearDependantHoliday(Func <int, bool> yearCondition, Holiday baseHoliday) : base(baseHoliday.Name)
 {
     this.yearCondition = yearCondition;
     this.baseHoliday   = baseHoliday;
 }
 public YearDependantHoliday(Func<int, bool> yearCondition, Holiday baseHoliday )
     : base(baseHoliday.Name)
 {
     this.yearCondition = yearCondition;
     this.baseHoliday = baseHoliday;
 }