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); } } }
public int GetNetWorkingDays(DateTime date1, DateTime date2) { return(provider.GetNetWorkingDays(date1, date2)); }
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); } } }