public void GetPublicHolidayByYears_WhenPassedYearsAndHOlidays_ThenReturnsExpectedDateList(List<int> years, PublicHoliday holiday, List<DateTime> expectedResult) { // Arrange var target = new FixedDayCalculator(); // Act var actual = target.GetPublicHolidayByYears(years, holiday); // Assert actual.Should().BeEquivalentTo(expectedResult); }
public void GetPublicHolidayByYears_WhenNullName_ThenThrows() { // Arrange var target = new FixedDayCalculator(); var holiday = new PublicHoliday { Name = null }; // Act Action actual = () => target.GetPublicHolidayByYears(null, holiday); // Assert actual.Should().Throw<ArgumentException>().WithMessage("Cannot process a custom holidays without a name."); }