public void GetPublicHolidayByYears_WhenPassedYearsAndHolidays_ThenReturnsExpectedDateList(List <int> years, PublicHoliday holiday, List <DateTime> expectedResult) { // Arrange var target = new EasterCalculator(); // Act var actual = target.GetPublicHolidayByYears(years, holiday); // Assert actual.Should().BeEquivalentTo(expectedResult); }
public void GetPublicHolidayByYears_WhenNullName_ThenThrows() { // Arrange var target = new EasterCalculator(); 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."); }