コード例 #1
0
        protected static void AssertProviderSoft(IWorkingDaysProvider prov, int iterations, params DateTime[] baseDates)
        {
            foreach (var baseDate in baseDates)
            {
                int      count = 0;
                DateTime curr  = baseDate;
                for (int i = 0; i < iterations; i++)
                {
                    if (prov.IsWorkingDay(curr))
                    {
                        count++;
                    }

                    prov.GetNetWorkingDays(baseDate, curr).Should().Be(count);

                    curr = curr.AddDays(1);
                }
            }
        }
コード例 #2
0
 public bool IsWorkingDay(DateTime date)
 {
     return(provider.IsWorkingDay(date));
 }
コード例 #3
0
        protected static void AssertProviderSoft(IWorkingDaysProvider prov, int iterations, params DateTime[] baseDates)
        {
            foreach (var baseDate in baseDates)
            {
                int count = 0;
                DateTime curr = baseDate;
                for (int i = 0; i < iterations; i++)
                {
                    if (prov.IsWorkingDay(curr))
                        count++;

                    prov.GetNetWorkingDays(baseDate, curr).Should().Be(count);

                    curr = curr.AddDays(1);
                }
            }
        }