public void GetPublicHolidayByYears_WhenPassedYearsAndHolidays_ThenReturnsExpectedDateList(List <int> years, PublicHoliday holiday, List <DateTime> expectedResult)
        {
            // Arrange
            var target = new BasedOnOtherHolidayCalculator();

            // Act
            var actual = target.GetPublicHolidayByYears(years, holiday);

            // Assert
            actual.Should().BeEquivalentTo(expectedResult);
        }
        public void GetPublicHolidayByYears_WhenNullNumberOfDaysFromReference_ThenThrows()
        {
            // Arrange
            var target  = new BasedOnOtherHolidayCalculator();
            var holiday = new PublicHoliday {
                Name = "Name", ReferenceHolidayName = "ReferenceName", NumberOfDaysFromReference = null
            };

            // Act
            Action actual = () => target.GetPublicHolidayByYears(null, holiday);

            // Assert
            actual.Should().Throw <ArgumentException>().WithMessage("You cannot have an empty NumberOfDaysFromReference for BasedOnOtherHoliday types.");
        }
        public void GetPublicHolidayByYears_WhenNullName_ThenThrows()
        {
            // Arrange
            var target  = new BasedOnOtherHolidayCalculator();
            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.");
        }