public void LastFridayInJuneForDateInAcademicYear(string inputDate, string expectedDate) { var inputDateTime = DateTime.Parse(inputDate); var expectedDateTime = DateTime.Parse(expectedDate); var academicYearCalendarService = new Service.AcademicYearCalendarService.AcademicYearCalendarService(); academicYearCalendarService.LastFridayInJuneForDateInAcademicYear(inputDateTime).Should().Be(expectedDateTime); }
public void FirstSeptemberForDateInAcademicYear(string inputDate, string expectedDate) { var inputDateTime = DateTime.Parse(inputDate); var expectedDateTime = DateTime.Parse(expectedDate); var academicYearCalendarService = new Service.AcademicYearCalendarService.AcademicYearCalendarService(); academicYearCalendarService.FirstSeptemberForDateInAcademicYear(inputDateTime).Should().Be(expectedDateTime); }
public void LastFridayInMonth(int month, int year, string expectedDate) { var date = new DateTime(year, month, 1); var expectedValue = DateTime.Parse(expectedDate); var academicYearCalendarService = new Service.AcademicYearCalendarService.AcademicYearCalendarService(); while (date.Month == month) { academicYearCalendarService.LastFridayInMonth(date).Should().Be(expectedValue); date = date.AddDays(1); } }