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_jayz1(int year) { var expected = new DateOnly(year, 12, 25); var actual = Holidays.JayZ1(year); Assert.Equal(expected, actual); }
public void Should_correctly_enumerate_target2_bank_holidays(int year) { //expected DateOnly[] expected = { Holidays.NewYear(year), Holidays.GoodFriday(year), Holidays.EasterMonday(year), Holidays.LabourDay(year), Holidays.JayZ1(year), Holidays.JayZ2(year) }; //actual var actual = Holidays.TargetBankHolidays(year); //compare var isOkay = expected.Except(actual).None() && actual.Except(expected).None(); Assert.True(isOkay); }