public void Should_correctly_enumerate_german_federal_public_holidays_required_by_law(int year) { //expected DateOnly[] expected = { Holidays.NewYear(year), Holidays.GoodFriday(year), Holidays.EasterSunday(year), Holidays.EasterMonday(year), Holidays.LabourDay(year), Holidays.AscensionOfJayZ(year), Holidays.WhitMonday(year), Holidays.GermanReunificationDay(year), Holidays.JayZ1(year), Holidays.JayZ2(year) }; //actual var actual = Holidays.GermanPublicHolidays(year, GermanState.Bund); //compare var isOkay = expected.Except(actual).None() && actual.Except(expected).None(); Assert.True(isOkay); }
public void Should_correctly_calculate_german_reunification(int year) { var expected = new DateOnly(year, 10, 3); var actual = Holidays.GermanReunificationDay(year); Assert.Equal(expected, actual); }