diff --git a/README.md b/README.md index 96f15490a..b7dd3572c 100644 --- a/README.md +++ b/README.md @@ -206,13 +206,11 @@ To access the public holidays of a subdivision of a country, e.g. Baden-Württem The following holiday types are supported: -| Type | Description | -|-------------|----------------------------------------------------------------------------------------------------------------------| -| Official | Official public holiday | -| Bank | Bank holiday, banks and offices are closed | -| School | School holiday, schools are closed | -| Authorities | Authorities are closed | -| Unofficial | Unofficial holiday that is no
Bank, School or Authorities holiday
(Deprecated, please use the other types) | +| Type | Description | +|------------|---------------------------------------------------------------------------------------------------------| +| Public | Public holiday | +| Bank | Bank holiday, banks and offices are closed | +| Unofficial | Unofficial holiday that is no
public or bank holiday
(Deprecated, please use the other types) | ## Development diff --git a/jollyday-core/src/main/java/de/focus_shift/jollyday/core/HolidayType.java b/jollyday-core/src/main/java/de/focus_shift/jollyday/core/HolidayType.java index 47f0d7865..ae7ffb0e5 100644 --- a/jollyday-core/src/main/java/de/focus_shift/jollyday/core/HolidayType.java +++ b/jollyday-core/src/main/java/de/focus_shift/jollyday/core/HolidayType.java @@ -1,48 +1,15 @@ package de.focus_shift.jollyday.core; /** - * Type of holiday. Each holiday can be placed in a category and this is - * represented by this type. The categories can mark a holiday as an official - * holiday or not. + * Type of holiday. + * Each holiday can be placed in a category and this is represented by this type. */ public enum HolidayType { - OFFICIAL_HOLIDAY { - @Override - public boolean isOfficialHoliday() { - return true; - } - }, + PUBLIC_HOLIDAY, - BANK_HOLIDAY { - @Override - public boolean isOfficialHoliday() { - return false; - } - }, - - SCHOOL_HOLIDAY { - @Override - public boolean isOfficialHoliday() { - return false; - } - }, - - AUTHORITIES_HOLIDAY { - @Override - public boolean isOfficialHoliday() { - return false; - } - }, + BANK_HOLIDAY, @Deprecated(since = "0.26.0", forRemoval = true) - UNOFFICIAL_HOLIDAY { - @Override - public boolean isOfficialHoliday() { - return false; - } - }; - - public abstract boolean isOfficialHoliday(); - + UNOFFICIAL_HOLIDAY; } diff --git a/jollyday-core/src/main/java/de/focus_shift/jollyday/core/impl/JapaneseHolidayManager.java b/jollyday-core/src/main/java/de/focus_shift/jollyday/core/impl/JapaneseHolidayManager.java index f8f66b16d..6a59d6e4c 100644 --- a/jollyday-core/src/main/java/de/focus_shift/jollyday/core/impl/JapaneseHolidayManager.java +++ b/jollyday-core/src/main/java/de/focus_shift/jollyday/core/impl/JapaneseHolidayManager.java @@ -34,7 +34,7 @@ public Set getHolidays(final int year, final String... args) { final LocalDate twoDaysLater = holiday.getDate().plusDays(2); if (CalendarUtil.contains(holidays, twoDaysLater)) { final LocalDate bridgingDate = twoDaysLater.minusDays(1); - additionalHolidays.add(new Holiday(bridgingDate, BRIDGING_HOLIDAY_PROPERTIES_KEY, HolidayType.OFFICIAL_HOLIDAY)); + additionalHolidays.add(new Holiday(bridgingDate, BRIDGING_HOLIDAY_PROPERTIES_KEY, HolidayType.PUBLIC_HOLIDAY)); } } holidays.addAll(additionalHolidays); diff --git a/jollyday-core/src/main/resources/focus_shift.de/jollyday/schema/holiday/holiday.xsd b/jollyday-core/src/main/resources/focus_shift.de/jollyday/schema/holiday/holiday.xsd index c7f85ced1..448384139 100644 --- a/jollyday-core/src/main/resources/focus_shift.de/jollyday/schema/holiday/holiday.xsd +++ b/jollyday-core/src/main/resources/focus_shift.de/jollyday/schema/holiday/holiday.xsd @@ -192,10 +192,8 @@ - + - - @@ -241,7 +239,7 @@ - + diff --git a/jollyday-core/src/test/java/de/focus_shift/jollyday/core/HolidayTest.java b/jollyday-core/src/test/java/de/focus_shift/jollyday/core/HolidayTest.java index 9b68be4dc..85704c032 100644 --- a/jollyday-core/src/test/java/de/focus_shift/jollyday/core/HolidayTest.java +++ b/jollyday-core/src/test/java/de/focus_shift/jollyday/core/HolidayTest.java @@ -5,7 +5,7 @@ import java.time.LocalDate; import java.util.Locale; -import static de.focus_shift.jollyday.core.HolidayType.OFFICIAL_HOLIDAY; +import static de.focus_shift.jollyday.core.HolidayType.PUBLIC_HOLIDAY; import static de.focus_shift.jollyday.core.HolidayType.UNOFFICIAL_HOLIDAY; import static java.util.Locale.ENGLISH; import static java.util.Locale.GERMAN; @@ -15,28 +15,28 @@ class HolidayTest { @Test void testComparable() { - final Holiday holiday = new Holiday(LocalDate.of(2015, 1, 1), null, OFFICIAL_HOLIDAY); + final Holiday holiday = new Holiday(LocalDate.of(2015, 1, 1), null, PUBLIC_HOLIDAY); assertThat(holiday).isInstanceOf(Comparable.class); } @Test void testCompareToLess() { - final Holiday newYear = new Holiday(LocalDate.of(2015, 1, 1), null, OFFICIAL_HOLIDAY); - final Holiday christmas = new Holiday(LocalDate.of(2015, 12, 25), null, OFFICIAL_HOLIDAY); + final Holiday newYear = new Holiday(LocalDate.of(2015, 1, 1), null, PUBLIC_HOLIDAY); + final Holiday christmas = new Holiday(LocalDate.of(2015, 12, 25), null, PUBLIC_HOLIDAY); assertThat(newYear).isLessThan(christmas); } @Test void testCompareToGreater() { - final Holiday christmas = new Holiday(LocalDate.of(2015, 12, 25), null, OFFICIAL_HOLIDAY); - final Holiday newYear = new Holiday(LocalDate.of(2015, 1, 1), null, OFFICIAL_HOLIDAY); + final Holiday christmas = new Holiday(LocalDate.of(2015, 12, 25), null, PUBLIC_HOLIDAY); + final Holiday newYear = new Holiday(LocalDate.of(2015, 1, 1), null, PUBLIC_HOLIDAY); assertThat(christmas).isGreaterThan(newYear); } @Test void testCompareToEqual() { - final Holiday firstDayOfYear = new Holiday(LocalDate.of(2015, 1, 1), null, OFFICIAL_HOLIDAY); - final Holiday newYear = new Holiday(LocalDate.of(2015, 1, 1), null, OFFICIAL_HOLIDAY); + final Holiday firstDayOfYear = new Holiday(LocalDate.of(2015, 1, 1), null, PUBLIC_HOLIDAY); + final Holiday newYear = new Holiday(LocalDate.of(2015, 1, 1), null, PUBLIC_HOLIDAY); assertThat(firstDayOfYear).isEqualByComparingTo(newYear); } @@ -44,7 +44,7 @@ void testCompareToEqual() { void testHolidayDescription() { Locale.setDefault(ENGLISH); - final Holiday holiday = new Holiday(LocalDate.of(2011, 2, 2), "CHRISTMAS", OFFICIAL_HOLIDAY); + final Holiday holiday = new Holiday(LocalDate.of(2011, 2, 2), "CHRISTMAS", PUBLIC_HOLIDAY); assertThat(holiday.getDescription()).isEqualTo("Christmas"); assertThat(holiday.getDescription(GERMAN)).isEqualTo("Weihnachten"); assertThat(holiday.getDescription(new Locale("nl"))).isEqualTo("Kerstmis"); @@ -52,16 +52,16 @@ void testHolidayDescription() { @Test void testHolidayEquals() { - final Holiday h1 = new Holiday(LocalDate.of(2011, 2, 2), "CHRISTMAS", OFFICIAL_HOLIDAY); + final Holiday h1 = new Holiday(LocalDate.of(2011, 2, 2), "CHRISTMAS", PUBLIC_HOLIDAY); assertThat(h1).isEqualTo(h1); - final Holiday h2b = new Holiday(LocalDate.of(2011, 2, 2), "CHRISTMAS", OFFICIAL_HOLIDAY); + final Holiday h2b = new Holiday(LocalDate.of(2011, 2, 2), "CHRISTMAS", PUBLIC_HOLIDAY); assertThat(h1).isEqualTo(h2b); - final Holiday h2 = new Holiday(LocalDate.of(2011, 2, 1), "CHRISTMAS", OFFICIAL_HOLIDAY); + final Holiday h2 = new Holiday(LocalDate.of(2011, 2, 1), "CHRISTMAS", PUBLIC_HOLIDAY); assertThat(h1).isNotEqualTo(h2); - final Holiday h3 = new Holiday(LocalDate.of(2011, 2, 2), "NEW_YEAR", OFFICIAL_HOLIDAY); + final Holiday h3 = new Holiday(LocalDate.of(2011, 2, 2), "NEW_YEAR", PUBLIC_HOLIDAY); assertThat(h1).isNotEqualTo(h3); final Holiday h4 = new Holiday(LocalDate.of(2011, 2, 2), "CHRISTMAS", UNOFFICIAL_HOLIDAY); diff --git a/jollyday-core/src/test/java/de/focus_shift/jollyday/core/parser/functions/CreateHolidayTest.java b/jollyday-core/src/test/java/de/focus_shift/jollyday/core/parser/functions/CreateHolidayTest.java index 9f084b867..0894d7e02 100644 --- a/jollyday-core/src/test/java/de/focus_shift/jollyday/core/parser/functions/CreateHolidayTest.java +++ b/jollyday-core/src/test/java/de/focus_shift/jollyday/core/parser/functions/CreateHolidayTest.java @@ -23,14 +23,14 @@ public String descriptionPropertiesKey() { @Override public HolidayType officiality() { - return HolidayType.OFFICIAL_HOLIDAY; + return HolidayType.PUBLIC_HOLIDAY; } }; final Holiday holiday = new CreateHoliday(LocalDate.of(2020, 4, 1)).apply(described); assertThat(holiday.getDate()).hasYear(2020).hasMonth(APRIL).hasDayOfMonth(1); - assertThat(holiday.getType()).isEqualTo(HolidayType.OFFICIAL_HOLIDAY); + assertThat(holiday.getType()).isEqualTo(HolidayType.PUBLIC_HOLIDAY); assertThat(holiday.getPropertiesKey()).isEqualTo("propertiesKey"); } } diff --git a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonChristianHoliday.java b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonChristianHoliday.java index 07da3a7b2..733c2cb1f 100644 --- a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonChristianHoliday.java +++ b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonChristianHoliday.java @@ -43,7 +43,7 @@ public String descriptionPropertiesKey() { @Override public HolidayType officiality() { return christianHoliday.getLocalizedType() == null - ? HolidayType.OFFICIAL_HOLIDAY + ? HolidayType.PUBLIC_HOLIDAY : HolidayType.valueOf(christianHoliday.getLocalizedType().name()); } diff --git a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonEthiopianOrthodoxHoliday.java b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonEthiopianOrthodoxHoliday.java index a18038ff6..b5536c755 100644 --- a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonEthiopianOrthodoxHoliday.java +++ b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonEthiopianOrthodoxHoliday.java @@ -23,7 +23,7 @@ public String descriptionPropertiesKey() { @Override public HolidayType officiality() { return ethiopianOrthodoxHoliday.getLocalizedType() == null - ? HolidayType.OFFICIAL_HOLIDAY + ? HolidayType.PUBLIC_HOLIDAY : HolidayType.valueOf(ethiopianOrthodoxHoliday.getLocalizedType().name()); } diff --git a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonFixed.java b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonFixed.java index d862f669c..a42012a68 100644 --- a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonFixed.java +++ b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonFixed.java @@ -35,7 +35,7 @@ public String descriptionPropertiesKey() { @Override public HolidayType officiality() { return fixed.getLocalizedType() == null - ? HolidayType.OFFICIAL_HOLIDAY + ? HolidayType.PUBLIC_HOLIDAY : HolidayType.valueOf(fixed.getLocalizedType().name()); } diff --git a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonFixedWeekdayBetweenFixed.java b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonFixedWeekdayBetweenFixed.java index 7ed850ac4..e4918a6ea 100644 --- a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonFixedWeekdayBetweenFixed.java +++ b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonFixedWeekdayBetweenFixed.java @@ -40,7 +40,7 @@ public String descriptionPropertiesKey() { @Override public HolidayType officiality() { return fixedWeekdayBetweenFixed.getLocalizedType() == null - ? HolidayType.OFFICIAL_HOLIDAY + ? HolidayType.PUBLIC_HOLIDAY : HolidayType.valueOf(fixedWeekdayBetweenFixed.getLocalizedType().name()); } diff --git a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonFixedWeekdayInMonth.java b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonFixedWeekdayInMonth.java index e05e38d98..a853ff70b 100644 --- a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonFixedWeekdayInMonth.java +++ b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonFixedWeekdayInMonth.java @@ -40,7 +40,7 @@ public String descriptionPropertiesKey() { @Override public HolidayType officiality() { return fixedWeekdayInMonth.getLocalizedType() == null - ? HolidayType.OFFICIAL_HOLIDAY + ? HolidayType.PUBLIC_HOLIDAY : HolidayType.valueOf(fixedWeekdayInMonth.getLocalizedType().name()); } diff --git a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonFixedWeekdayRelativeToFixed.java b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonFixedWeekdayRelativeToFixed.java index 22bdf09d5..f61d0a12e 100644 --- a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonFixedWeekdayRelativeToFixed.java +++ b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonFixedWeekdayRelativeToFixed.java @@ -47,7 +47,7 @@ public String descriptionPropertiesKey() { @Override public HolidayType officiality() { return fixedWeekdayRelativeToFixed.getLocalizedType() == null - ? HolidayType.OFFICIAL_HOLIDAY + ? HolidayType.PUBLIC_HOLIDAY : HolidayType.valueOf(fixedWeekdayRelativeToFixed.getLocalizedType().name()); } diff --git a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonIslamicHoliday.java b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonIslamicHoliday.java index 6a5557f5a..9e8c9de93 100644 --- a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonIslamicHoliday.java +++ b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonIslamicHoliday.java @@ -33,7 +33,7 @@ public String descriptionPropertiesKey() { @Override public HolidayType officiality() { return islamicHoliday.getLocalizedType() == null - ? HolidayType.OFFICIAL_HOLIDAY + ? HolidayType.PUBLIC_HOLIDAY : HolidayType.valueOf(islamicHoliday.getLocalizedType().name()); } diff --git a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonRelativeToEasterSunday.java b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonRelativeToEasterSunday.java index 98b5bd58b..831f123cd 100644 --- a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonRelativeToEasterSunday.java +++ b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonRelativeToEasterSunday.java @@ -27,7 +27,7 @@ public String descriptionPropertiesKey() { @Override public HolidayType officiality() { return relativeToEasterSunday.getLocalizedType() == null - ? HolidayType.OFFICIAL_HOLIDAY + ? HolidayType.PUBLIC_HOLIDAY : HolidayType.valueOf(relativeToEasterSunday.getLocalizedType().name()); } diff --git a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonRelativeToFixed.java b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonRelativeToFixed.java index 6b58612f5..3778af542 100644 --- a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonRelativeToFixed.java +++ b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonRelativeToFixed.java @@ -52,7 +52,7 @@ public String descriptionPropertiesKey() { @Override public HolidayType officiality() { return relativeToFixed.getLocalizedType() == null - ? HolidayType.OFFICIAL_HOLIDAY + ? HolidayType.PUBLIC_HOLIDAY : HolidayType.valueOf(relativeToFixed.getLocalizedType().name()); } diff --git a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonRelativeToWeekdayInMonth.java b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonRelativeToWeekdayInMonth.java index cecb0143b..55bade30d 100644 --- a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonRelativeToWeekdayInMonth.java +++ b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonRelativeToWeekdayInMonth.java @@ -41,7 +41,7 @@ public String descriptionPropertiesKey() { @Override public HolidayType officiality() { return relativeToWeekdayInMonth.getLocalizedType() == null - ? HolidayType.OFFICIAL_HOLIDAY + ? HolidayType.PUBLIC_HOLIDAY : HolidayType.valueOf(relativeToWeekdayInMonth.getLocalizedType().name()); } diff --git a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/Holiday.java b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/Holiday.java index 5b95953c8..0db7eb92c 100644 --- a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/Holiday.java +++ b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/Holiday.java @@ -107,7 +107,7 @@ public void setDescriptionPropertiesKey(String value) { */ public HolidayType getLocalizedType() { if (localizedType == null) { - return HolidayType.OFFICIAL_HOLIDAY; + return HolidayType.PUBLIC_HOLIDAY; } else { return localizedType; } diff --git a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/HolidayType.java b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/HolidayType.java index 5af5373b3..e444ad734 100644 --- a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/HolidayType.java +++ b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/HolidayType.java @@ -2,10 +2,8 @@ public enum HolidayType { - OFFICIAL_HOLIDAY, + PUBLIC_HOLIDAY, BANK_HOLIDAY, - SCHOOL_HOLIDAY, - AUTHORITIES_HOLIDAY, UNOFFICIAL_HOLIDAY; public String value() { diff --git a/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbChristianHoliday.java b/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbChristianHoliday.java index 59a6478d1..56edc0351 100644 --- a/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbChristianHoliday.java +++ b/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbChristianHoliday.java @@ -44,7 +44,7 @@ public String descriptionPropertiesKey() { @Override public HolidayType officiality() { return christianHoliday.getLocalizedType() == null - ? HolidayType.OFFICIAL_HOLIDAY + ? HolidayType.PUBLIC_HOLIDAY : HolidayType.valueOf(christianHoliday.getLocalizedType().name()); } diff --git a/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbEthiopianOrthodoxHoliday.java b/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbEthiopianOrthodoxHoliday.java index 07234c389..3933786e1 100644 --- a/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbEthiopianOrthodoxHoliday.java +++ b/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbEthiopianOrthodoxHoliday.java @@ -23,7 +23,7 @@ public String descriptionPropertiesKey() { @Override public HolidayType officiality() { return ethiopianOrthodoxHoliday.getLocalizedType() == null - ? HolidayType.OFFICIAL_HOLIDAY + ? HolidayType.PUBLIC_HOLIDAY : HolidayType.valueOf(ethiopianOrthodoxHoliday.getLocalizedType().name()); } diff --git a/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbFixed.java b/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbFixed.java index d299a8f32..2f7314015 100644 --- a/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbFixed.java +++ b/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbFixed.java @@ -35,7 +35,7 @@ public String descriptionPropertiesKey() { @Override public HolidayType officiality() { return fixed.getLocalizedType() == null - ? HolidayType.OFFICIAL_HOLIDAY + ? HolidayType.PUBLIC_HOLIDAY : HolidayType.valueOf(fixed.getLocalizedType().name()); } diff --git a/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbFixedWeekdayBetweenFixed.java b/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbFixedWeekdayBetweenFixed.java index b4f0aee7e..b810801fc 100644 --- a/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbFixedWeekdayBetweenFixed.java +++ b/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbFixedWeekdayBetweenFixed.java @@ -40,7 +40,7 @@ public String descriptionPropertiesKey() { @Override public HolidayType officiality() { return fixedWeekdayBetweenFixed.getLocalizedType() == null - ? HolidayType.OFFICIAL_HOLIDAY + ? HolidayType.PUBLIC_HOLIDAY : HolidayType.valueOf(fixedWeekdayBetweenFixed.getLocalizedType().name()); } diff --git a/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbFixedWeekdayInMonth.java b/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbFixedWeekdayInMonth.java index ac477c61a..bef324c00 100644 --- a/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbFixedWeekdayInMonth.java +++ b/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbFixedWeekdayInMonth.java @@ -40,7 +40,7 @@ public String descriptionPropertiesKey() { @Override public HolidayType officiality() { return fixedWeekdayInMonth.getLocalizedType() == null - ? HolidayType.OFFICIAL_HOLIDAY + ? HolidayType.PUBLIC_HOLIDAY : HolidayType.valueOf(fixedWeekdayInMonth.getLocalizedType().name()); } diff --git a/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbFixedWeekdayRelativeToFixed.java b/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbFixedWeekdayRelativeToFixed.java index a3bf6d78c..3d4a42996 100644 --- a/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbFixedWeekdayRelativeToFixed.java +++ b/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbFixedWeekdayRelativeToFixed.java @@ -47,7 +47,7 @@ public String descriptionPropertiesKey() { @Override public HolidayType officiality() { return fixedWeekdayRelativeToFixed.getLocalizedType() == null - ? HolidayType.OFFICIAL_HOLIDAY + ? HolidayType.PUBLIC_HOLIDAY : HolidayType.valueOf(fixedWeekdayRelativeToFixed.getLocalizedType().name()); } diff --git a/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbIslamicHoliday.java b/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbIslamicHoliday.java index c4efec86d..4a45094bd 100644 --- a/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbIslamicHoliday.java +++ b/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbIslamicHoliday.java @@ -33,7 +33,7 @@ public String descriptionPropertiesKey() { @Override public HolidayType officiality() { return islamicHoliday.getLocalizedType() == null - ? HolidayType.OFFICIAL_HOLIDAY + ? HolidayType.PUBLIC_HOLIDAY : HolidayType.valueOf(islamicHoliday.getLocalizedType().name()); } diff --git a/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbRelativeToEasterSunday.java b/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbRelativeToEasterSunday.java index 3f82b42d8..4c971cc25 100644 --- a/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbRelativeToEasterSunday.java +++ b/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbRelativeToEasterSunday.java @@ -28,7 +28,7 @@ public String descriptionPropertiesKey() { @Override public HolidayType officiality() { return relativeToEasterSunday.getLocalizedType() == null - ? HolidayType.OFFICIAL_HOLIDAY + ? HolidayType.PUBLIC_HOLIDAY : HolidayType.valueOf(relativeToEasterSunday.getLocalizedType().name()); } diff --git a/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbRelativeToFixed.java b/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbRelativeToFixed.java index f65d7853b..a95c2db2d 100644 --- a/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbRelativeToFixed.java +++ b/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbRelativeToFixed.java @@ -52,7 +52,7 @@ public String descriptionPropertiesKey() { @Override public HolidayType officiality() { return relativeToFixed.getLocalizedType() == null - ? HolidayType.OFFICIAL_HOLIDAY + ? HolidayType.PUBLIC_HOLIDAY : HolidayType.valueOf(relativeToFixed.getLocalizedType().name()); } diff --git a/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbRelativeToWeekdayInMonth.java b/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbRelativeToWeekdayInMonth.java index 9025ac74c..0051644b0 100644 --- a/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbRelativeToWeekdayInMonth.java +++ b/jollyday-jaxb/src/main/java/de/focus_shift/jollyday/jaxb/JaxbRelativeToWeekdayInMonth.java @@ -41,7 +41,7 @@ public String descriptionPropertiesKey() { @Override public HolidayType officiality() { return relativeToWeekdayInMonth.getLocalizedType() == null - ? HolidayType.OFFICIAL_HOLIDAY + ? HolidayType.PUBLIC_HOLIDAY : HolidayType.valueOf(relativeToWeekdayInMonth.getLocalizedType().name()); } diff --git a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/HolidayManagerTest.java b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/HolidayManagerTest.java index 6c41c1743..37b159671 100644 --- a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/HolidayManagerTest.java +++ b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/HolidayManagerTest.java @@ -23,7 +23,7 @@ import java.util.stream.Stream; import static de.focus_shift.jollyday.core.HolidayCalendar.GERMANY; -import static de.focus_shift.jollyday.core.HolidayType.OFFICIAL_HOLIDAY; +import static de.focus_shift.jollyday.core.HolidayType.PUBLIC_HOLIDAY; import static de.focus_shift.jollyday.core.HolidayType.UNOFFICIAL_HOLIDAY; import static de.focus_shift.jollyday.core.ManagerParameters.create; import static java.time.Month.APRIL; @@ -181,7 +181,7 @@ void ensureIsHolidayMethodReturnsTrueFalseForCalendarChronologyAndHolidayType() calendar.set(MONTH, Calendar.JANUARY); calendar.set(DAY_OF_MONTH, 4); assertThat(sut.isHoliday(calendar, UNOFFICIAL_HOLIDAY)).isTrue(); - assertThat(sut.isHoliday(calendar, OFFICIAL_HOLIDAY)).isFalse(); + assertThat(sut.isHoliday(calendar, PUBLIC_HOLIDAY)).isFalse(); } @Test @@ -194,7 +194,7 @@ void ensureIsHolidayMethodReturnsTrueFalseForLocalDate() { @Test void ensureIsHolidayMethodReturnsTrueFalseForLocalDateWithHolidayType() { final HolidayManager sut = HolidayManager.getInstance(create("test")); - assertThat(sut.isHoliday(LocalDate.of(2010, 1, 4), OFFICIAL_HOLIDAY)).isFalse(); + assertThat(sut.isHoliday(LocalDate.of(2010, 1, 4), PUBLIC_HOLIDAY)).isFalse(); assertThat(sut.isHoliday(LocalDate.of(2010, 1, 4), UNOFFICIAL_HOLIDAY)).isTrue(); } diff --git a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayCHTest.java b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayCHTest.java index 7c280556a..5a32c93b2 100644 --- a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayCHTest.java +++ b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayCHTest.java @@ -12,7 +12,7 @@ import java.util.Set; import static de.focus_shift.jollyday.core.HolidayCalendar.SWITZERLAND; -import static de.focus_shift.jollyday.core.HolidayType.OFFICIAL_HOLIDAY; +import static de.focus_shift.jollyday.core.HolidayType.PUBLIC_HOLIDAY; import static de.focus_shift.jollyday.core.ManagerParameters.create; import static java.time.Month.DECEMBER; import static java.time.Month.JUNE; @@ -35,7 +35,7 @@ void ensuresThatStNicholasIsNotConfiguredInObwaldenUntil1946(@ForAll @YearRange( final Set holidays = holidayManager.getHolidays(year.getValue(), "ow"); assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), SEPTEMBER, 25), "ST_NICHOLAS", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), SEPTEMBER, 25), "ST_NICHOLAS", PUBLIC_HOLIDAY)); } @Property @@ -44,7 +44,7 @@ void ensuresThatStNicholasIsConfiguredInObwalden(@ForAll @YearRange(min = 1947) final Set holidays = holidayManager.getHolidays(year.getValue(), "ow"); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), SEPTEMBER, 25), "ST_NICHOLAS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), SEPTEMBER, 25), "ST_NICHOLAS", PUBLIC_HOLIDAY)); } @Property @@ -53,7 +53,7 @@ void ensuresThatStPeterAndPaulIsConfiguredInTicino(@ForAll @YearRange Year year) final Set holidays = holidayManager.getHolidays(year.getValue(), "ti"); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JUNE, 29), "ST_PETER_PAUL", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JUNE, 29), "ST_PETER_PAUL", PUBLIC_HOLIDAY)); } @Property @@ -62,7 +62,7 @@ void ensuresThatDayOfIndependenceIsConfiguredInJura(@ForAll @YearRange Year year final Set holidays = holidayManager.getHolidays(year.getValue(), "ju"); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JUNE, 23), "INDEPENDENCE_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JUNE, 23), "INDEPENDENCE_DAY", PUBLIC_HOLIDAY)); } @Property @@ -71,6 +71,6 @@ void ensuresThatRestorationOfTheRepublicIsConfiguredInGeneve(@ForAll @YearRange final Set holidays = holidayManager.getHolidays(year.getValue(), "ge"); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 31), "RESTORATION_OF_THE_REPUBLIC", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 31), "RESTORATION_OF_THE_REPUBLIC", PUBLIC_HOLIDAY)); } } diff --git a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayCZTest.java b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayCZTest.java index a575c03ec..3b92b5cef 100644 --- a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayCZTest.java +++ b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayCZTest.java @@ -11,7 +11,7 @@ import java.util.Set; import static de.focus_shift.jollyday.core.HolidayCalendar.CZECH_REPUBLIC; -import static de.focus_shift.jollyday.core.HolidayType.OFFICIAL_HOLIDAY; +import static de.focus_shift.jollyday.core.HolidayType.PUBLIC_HOLIDAY; import static de.focus_shift.jollyday.core.ManagerParameters.create; import static java.time.Month.DECEMBER; import static java.time.Month.JANUARY; @@ -30,7 +30,7 @@ void ensuresThatNewYearConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", PUBLIC_HOLIDAY)); } @Property @@ -39,7 +39,7 @@ void ensuresThatLabourDayConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 1), "LABOUR_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 1), "LABOUR_DAY", PUBLIC_HOLIDAY)); } @Property @@ -48,7 +48,7 @@ void ensuresThatLiberationConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 8), "LIBERATION", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 8), "LIBERATION", PUBLIC_HOLIDAY)); } @Property @@ -57,7 +57,7 @@ void ensuresThatCyrusMethodiusConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JULY, 5), "CYRUS_METHODIUS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JULY, 5), "CYRUS_METHODIUS", PUBLIC_HOLIDAY)); } @Property @@ -66,7 +66,7 @@ void ensuresThatHusConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JULY, 6), "HUS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JULY, 6), "HUS", PUBLIC_HOLIDAY)); } @Property @@ -75,7 +75,7 @@ void ensuresThatWencelasConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), SEPTEMBER, 28), "WENCELAS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), SEPTEMBER, 28), "WENCELAS", PUBLIC_HOLIDAY)); } @Property @@ -84,7 +84,7 @@ void ensuresThatIndependenceDayConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), OCTOBER, 28), "INDEPENDENCE_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), OCTOBER, 28), "INDEPENDENCE_DAY", PUBLIC_HOLIDAY)); } @Property @@ -93,7 +93,7 @@ void ensuresThatFreedomDemocracyConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), NOVEMBER, 17), "FREEDOM_DEMOCRACY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), NOVEMBER, 17), "FREEDOM_DEMOCRACY", PUBLIC_HOLIDAY)); } @Property @@ -102,7 +102,7 @@ void ensuresThatChristmasEveConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 24), "CHRISTMAS_EVE", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 24), "CHRISTMAS_EVE", PUBLIC_HOLIDAY)); } @Property @@ -111,7 +111,7 @@ void ensuresThatChristmasConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", PUBLIC_HOLIDAY)); } @Property @@ -120,7 +120,7 @@ void ensuresThatStephensConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "STEPHENS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "STEPHENS", PUBLIC_HOLIDAY)); } @Property diff --git a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayDKTest.java b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayDKTest.java index e65262dba..1e421aa34 100644 --- a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayDKTest.java +++ b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayDKTest.java @@ -12,7 +12,7 @@ import java.util.Set; import static de.focus_shift.jollyday.core.HolidayCalendar.DENMARK; -import static de.focus_shift.jollyday.core.HolidayType.OFFICIAL_HOLIDAY; +import static de.focus_shift.jollyday.core.HolidayType.PUBLIC_HOLIDAY; import static de.focus_shift.jollyday.core.ManagerParameters.create; import static java.time.Month.DECEMBER; import static java.time.Month.JANUARY; @@ -27,7 +27,7 @@ void ensuresThatNewYearIsOnFirstJanuary(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", PUBLIC_HOLIDAY)); } @Property @@ -36,8 +36,8 @@ void ensuresThatFirstAndSecondChristmasIsCorrect(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", OFFICIAL_HOLIDAY)) - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "STEPHENS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", PUBLIC_HOLIDAY)) + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "STEPHENS", PUBLIC_HOLIDAY)); } @Test @@ -47,7 +47,7 @@ void ensuresThatGeneralPrayersDayIsOnlyUntil2023() { final Set holidays2023 = holidayManagerDK.getHolidays(2023); assertThat(holidays2023) .isNotEmpty() - .contains(new Holiday(LocalDate.of(2023, MAY, 5), "christian.GENERAL_PRAYER_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(2023, MAY, 5), "christian.GENERAL_PRAYER_DAY", PUBLIC_HOLIDAY)); final Set holidays2024 = holidayManagerDK.getHolidays(2024); assertThat(holidays2024) diff --git a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayFITest.java b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayFITest.java index e7d62cb7d..9d99ea381 100644 --- a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayFITest.java +++ b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayFITest.java @@ -13,7 +13,7 @@ import java.util.Set; import static de.focus_shift.jollyday.core.HolidayCalendar.FINLAND; -import static de.focus_shift.jollyday.core.HolidayType.OFFICIAL_HOLIDAY; +import static de.focus_shift.jollyday.core.HolidayType.PUBLIC_HOLIDAY; import static de.focus_shift.jollyday.core.ManagerParameters.create; import static java.time.Month.DECEMBER; import static java.time.Month.JANUARY; @@ -42,7 +42,7 @@ void ensuresThatNewYearIsOnFirstJanuary(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", PUBLIC_HOLIDAY)); } @Property @@ -51,7 +51,7 @@ void ensuresThatEpiphanyConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 6), "EPIPHANY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 6), "EPIPHANY", PUBLIC_HOLIDAY)); } @Property @@ -60,7 +60,7 @@ void ensuresThatLabourDayIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 1), "LABOUR_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 1), "LABOUR_DAY", PUBLIC_HOLIDAY)); } @Property @@ -69,7 +69,7 @@ void ensuresThatDayOfIndependenceIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 6), "INDEPENDENCE_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 6), "INDEPENDENCE_DAY", PUBLIC_HOLIDAY)); } @Property @@ -78,9 +78,9 @@ void ensuresThatOrthodoxChristmasIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 24), "CHRISTMAS_EVE", OFFICIAL_HOLIDAY)) - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", OFFICIAL_HOLIDAY)) - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "STEPHENS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 24), "CHRISTMAS_EVE", PUBLIC_HOLIDAY)) + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", PUBLIC_HOLIDAY)) + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "STEPHENS", PUBLIC_HOLIDAY)); } @Property @@ -129,7 +129,7 @@ void ensuresThatSelfGovernanceIsConfiguredInAland(@ForAll @YearRange Year year) final Set holidays = holidayManager.getHolidays(year.getValue(), "01"); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JUNE, 9), "SELF_GOVERNANCE", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JUNE, 9), "SELF_GOVERNANCE", PUBLIC_HOLIDAY)); } @Property diff --git a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayGBTest.java b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayGBTest.java index 0dfd42f5a..f726c2403 100644 --- a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayGBTest.java +++ b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayGBTest.java @@ -11,7 +11,7 @@ import java.util.Set; import static de.focus_shift.jollyday.core.HolidayCalendar.UNITED_KINGDOM; -import static de.focus_shift.jollyday.core.HolidayType.OFFICIAL_HOLIDAY; +import static de.focus_shift.jollyday.core.HolidayType.PUBLIC_HOLIDAY; import static de.focus_shift.jollyday.core.ManagerParameters.create; import static java.time.Month.MAY; import static org.assertj.core.api.Assertions.assertThat; @@ -33,7 +33,7 @@ void ensuresThatKingsCoronationForKingCharlesIIIIn2023() { final Set holidays2023 = holidayManagerGB.getHolidays(2023); assertThat(holidays2023) - .contains(new Holiday(LocalDate.of(2023, MAY, 8), "KINGS_CORONATION", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(2023, MAY, 8), "KINGS_CORONATION", PUBLIC_HOLIDAY)); final Set holidays2024 = holidayManagerGB.getHolidays(2024); assertThat(holidays2024) diff --git a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayGGTest.java b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayGGTest.java index 0483737d7..d74899122 100644 --- a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayGGTest.java +++ b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayGGTest.java @@ -11,7 +11,7 @@ import java.util.Set; import static de.focus_shift.jollyday.core.HolidayCalendar.GUERNSEY; -import static de.focus_shift.jollyday.core.HolidayType.OFFICIAL_HOLIDAY; +import static de.focus_shift.jollyday.core.HolidayType.PUBLIC_HOLIDAY; import static de.focus_shift.jollyday.core.ManagerParameters.create; import static java.time.Month.MAY; import static org.assertj.core.api.Assertions.assertThat; @@ -32,7 +32,7 @@ void ensuresThatKingsCoronationForKingCharlesIIIIn2023() { final Set holidays2023 = holidayManager.getHolidays(2023); assertThat(holidays2023) - .contains(new Holiday(LocalDate.of(2023, MAY, 8), "KINGS_CORONATION", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(2023, MAY, 8), "KINGS_CORONATION", PUBLIC_HOLIDAY)); final Set holidays2024 = holidayManager.getHolidays(2024); assertThat(holidays2024) diff --git a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayHRTest.java b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayHRTest.java index 65312d776..116a90e48 100644 --- a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayHRTest.java +++ b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayHRTest.java @@ -11,7 +11,7 @@ import java.util.Set; import static de.focus_shift.jollyday.core.HolidayCalendar.CROATIA; -import static de.focus_shift.jollyday.core.HolidayType.OFFICIAL_HOLIDAY; +import static de.focus_shift.jollyday.core.HolidayType.PUBLIC_HOLIDAY; import static de.focus_shift.jollyday.core.ManagerParameters.create; import static java.time.Month.AUGUST; import static java.time.Month.DECEMBER; @@ -30,7 +30,7 @@ void ensuresThatNewYearIsOnFirstJanuary(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", PUBLIC_HOLIDAY)); } @Property @@ -39,7 +39,7 @@ void ensuresThatLabourDayIsCorrect(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 1), "LABOUR_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 1), "LABOUR_DAY", PUBLIC_HOLIDAY)); } @Property @@ -48,7 +48,7 @@ void ensuresThatNationalDayIsConfiguredSince2020(@ForAll @YearRange(min = 2020) final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 30), "NATIONAL_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 30), "NATIONAL_DAY", PUBLIC_HOLIDAY)); } @Property @@ -57,7 +57,7 @@ void ensuresThatNationalDayIsNotConfiguredUntil2019(@ForAll @YearRange(max = 201 final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), MAY, 30), "NATIONAL_DAY", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), MAY, 30), "NATIONAL_DAY", PUBLIC_HOLIDAY)); } @Property @@ -66,7 +66,7 @@ void ensuresThatAntiFascistIsCorrect(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JUNE, 22), "ANTI_FASCIST", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JUNE, 22), "ANTI_FASCIST", PUBLIC_HOLIDAY)); } @Property @@ -75,7 +75,7 @@ void ensuresThatStatehoodIsNotConfiguredTo2001(@ForAll @YearRange(max = 2001) Ye final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), JUNE, 25), "STATEHOOD", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), JUNE, 25), "STATEHOOD", PUBLIC_HOLIDAY)); } @Property @@ -84,7 +84,7 @@ void ensuresThatStatehoodIsConfiguredFrom2002Until2019(@ForAll @YearRange(min = final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JUNE, 25), "STATEHOOD", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JUNE, 25), "STATEHOOD", PUBLIC_HOLIDAY)); } @Property @@ -93,7 +93,7 @@ void ensuresThatStatehoodIsNotConfiguredSince2020(@ForAll @YearRange(min = 2020) final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), JUNE, 25), "STATEHOOD", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), JUNE, 25), "STATEHOOD", PUBLIC_HOLIDAY)); } @Property @@ -102,7 +102,7 @@ void ensuresThatVictoryIsCorrect(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), AUGUST, 5), "VICTORY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), AUGUST, 5), "VICTORY", PUBLIC_HOLIDAY)); } @Property @@ -111,7 +111,7 @@ void ensuresThatAssumptionMaryIsCorrect(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), AUGUST, 15), "ASSUMPTION_MARY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), AUGUST, 15), "ASSUMPTION_MARY", PUBLIC_HOLIDAY)); } @Property @@ -120,7 +120,7 @@ void ensuresThatIndependenceDayIsNotConfiguredTo2001(@ForAll @YearRange(max = 20 final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), OCTOBER, 8), "INDEPENDENCE_DAY", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), OCTOBER, 8), "INDEPENDENCE_DAY", PUBLIC_HOLIDAY)); } @Property @@ -129,7 +129,7 @@ void ensuresThatIndependenceDayIsConfiguredFrom2002Until2019(@ForAll @YearRange( final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), OCTOBER, 8), "INDEPENDENCE_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), OCTOBER, 8), "INDEPENDENCE_DAY", PUBLIC_HOLIDAY)); } @Property @@ -138,7 +138,7 @@ void ensuresThatIndependenceDayIsNotConfiguredSince2020(@ForAll @YearRange(min = final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), OCTOBER, 8), "INDEPENDENCE_DAY", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), OCTOBER, 8), "INDEPENDENCE_DAY", PUBLIC_HOLIDAY)); } @Property @@ -147,7 +147,7 @@ void ensuresThatAllSaintsIsCorrect(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), NOVEMBER, 1), "ALL_SAINTS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), NOVEMBER, 1), "ALL_SAINTS", PUBLIC_HOLIDAY)); } @Property @@ -156,7 +156,7 @@ void ensuresThatRemembranceIsConfiguredSince2020(@ForAll @YearRange(min = 2020) final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), NOVEMBER, 18), "REMEMBRANCE", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), NOVEMBER, 18), "REMEMBRANCE", PUBLIC_HOLIDAY)); } @Property @@ -165,7 +165,7 @@ void ensuresThatRemembranceIsNotConfiguredUntil2019(@ForAll @YearRange(max = 201 final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), NOVEMBER, 18), "REMEMBRANCE", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), NOVEMBER, 18), "REMEMBRANCE", PUBLIC_HOLIDAY)); } @Property @@ -174,8 +174,8 @@ void ensuresThatFirstAndSecondChristmasIsCorrect(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", OFFICIAL_HOLIDAY)) - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "STEPHENS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", PUBLIC_HOLIDAY)) + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "STEPHENS", PUBLIC_HOLIDAY)); } @Property diff --git a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayIETest.java b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayIETest.java index 8aeb31cfc..a73d1d73b 100644 --- a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayIETest.java +++ b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayIETest.java @@ -12,7 +12,7 @@ import java.util.Set; import static de.focus_shift.jollyday.core.HolidayCalendar.IRELAND; -import static de.focus_shift.jollyday.core.HolidayType.OFFICIAL_HOLIDAY; +import static de.focus_shift.jollyday.core.HolidayType.PUBLIC_HOLIDAY; import static de.focus_shift.jollyday.core.ManagerParameters.create; import static java.time.Month.DECEMBER; import static java.time.Month.FEBRUARY; @@ -28,7 +28,7 @@ void ensuresThatNewYearConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", PUBLIC_HOLIDAY)); } @Property @@ -37,7 +37,7 @@ void ensuresThatStPatrickConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), MARCH, 17), "ST_PATRICK", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), MARCH, 17), "ST_PATRICK", PUBLIC_HOLIDAY)); } @Property @@ -46,7 +46,7 @@ void ensuresThatChristmasIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", PUBLIC_HOLIDAY)); } @Property @@ -55,7 +55,7 @@ void ensuresThatStephensIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "STEPHENS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "STEPHENS", PUBLIC_HOLIDAY)); } @Property @@ -104,7 +104,7 @@ void testStBrigidsDayOn2023() { final Set holidays2023 = holidayManagerIE.getHolidays(2023); assertThat(holidays2023) - .contains(new Holiday(LocalDate.of(2023, FEBRUARY, 6), "ST_BRIGID", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(2023, FEBRUARY, 6), "ST_BRIGID", PUBLIC_HOLIDAY)); } @Test @@ -113,7 +113,7 @@ void testStBrigidsDayOn2024() { final Set holidays2024 = holidayManagerIE.getHolidays(2024); assertThat(holidays2024) - .contains(new Holiday(LocalDate.of(2024, FEBRUARY, 5), "ST_BRIGID", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(2024, FEBRUARY, 5), "ST_BRIGID", PUBLIC_HOLIDAY)); } @Test @@ -122,7 +122,7 @@ void testStBrigidsDayOn2025() { final Set holidays2025 = holidayManagerIE.getHolidays(2025); assertThat(holidays2025) - .contains(new Holiday(LocalDate.of(2025, FEBRUARY, 3), "ST_BRIGID", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(2025, FEBRUARY, 3), "ST_BRIGID", PUBLIC_HOLIDAY)); } @Test @@ -131,7 +131,7 @@ void testStBrigidsDayOn2026() { final Set holidays2026 = holidayManagerIE.getHolidays(2026); assertThat(holidays2026) - .contains(new Holiday(LocalDate.of(2026, FEBRUARY, 2), "ST_BRIGID", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(2026, FEBRUARY, 2), "ST_BRIGID", PUBLIC_HOLIDAY)); } @Test @@ -140,7 +140,7 @@ void testStBrigidsDayOn2027() { final Set holidays2027 = holidayManagerIE.getHolidays(2027); assertThat(holidays2027) - .contains(new Holiday(LocalDate.of(2027, FEBRUARY, 1), "ST_BRIGID", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(2027, FEBRUARY, 1), "ST_BRIGID", PUBLIC_HOLIDAY)); } @Test @@ -149,7 +149,7 @@ void testStBrigidsDayOn2028() { final Set holidays2028 = holidayManagerIE.getHolidays(2028); assertThat(holidays2028) - .contains(new Holiday(LocalDate.of(2028, FEBRUARY, 7), "ST_BRIGID", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(2028, FEBRUARY, 7), "ST_BRIGID", PUBLIC_HOLIDAY)); } @Test @@ -158,6 +158,6 @@ void testStBrigidsDayOn2030() { final Set holidays2030 = holidayManagerIE.getHolidays(2030); assertThat(holidays2030) - .contains(new Holiday(LocalDate.of(2030, FEBRUARY, 1), "ST_BRIGID", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(2030, FEBRUARY, 1), "ST_BRIGID", PUBLIC_HOLIDAY)); } } diff --git a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayIMTest.java b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayIMTest.java index c9b21aeb2..5cb4cf149 100644 --- a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayIMTest.java +++ b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayIMTest.java @@ -11,7 +11,7 @@ import java.util.Set; import static de.focus_shift.jollyday.core.HolidayCalendar.ISLE_OF_MAN; -import static de.focus_shift.jollyday.core.HolidayType.OFFICIAL_HOLIDAY; +import static de.focus_shift.jollyday.core.HolidayType.PUBLIC_HOLIDAY; import static de.focus_shift.jollyday.core.ManagerParameters.create; import static java.time.Month.MAY; import static org.assertj.core.api.Assertions.assertThat; @@ -32,7 +32,7 @@ void ensuresThatKingsCoronationForKingCharlesIIIIn2023() { final Set holidays2023 = holidayManager.getHolidays(2023); assertThat(holidays2023) - .contains(new Holiday(LocalDate.of(2023, MAY, 8), "KINGS_CORONATION", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(2023, MAY, 8), "KINGS_CORONATION", PUBLIC_HOLIDAY)); final Set holidays2024 = holidayManager.getHolidays(2024); assertThat(holidays2024) diff --git a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayITTest.java b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayITTest.java index 879c6e156..f5224390a 100644 --- a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayITTest.java +++ b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayITTest.java @@ -11,7 +11,7 @@ import java.util.Set; import static de.focus_shift.jollyday.core.HolidayCalendar.ITALY; -import static de.focus_shift.jollyday.core.HolidayType.OFFICIAL_HOLIDAY; +import static de.focus_shift.jollyday.core.HolidayType.PUBLIC_HOLIDAY; import static de.focus_shift.jollyday.core.ManagerParameters.create; import static java.time.Month.APRIL; import static java.time.Month.AUGUST; @@ -30,7 +30,7 @@ void ensuresThatEpiphanyConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 6), "EPIPHANY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 6), "EPIPHANY", PUBLIC_HOLIDAY)); } @Property @@ -39,7 +39,7 @@ void ensuresThatLiberationIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), APRIL, 25), "LIBERATION", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), APRIL, 25), "LIBERATION", PUBLIC_HOLIDAY)); } @Property @@ -48,7 +48,7 @@ void ensuresThatLabourDayIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 1), "LABOUR_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 1), "LABOUR_DAY", PUBLIC_HOLIDAY)); } @Property @@ -57,7 +57,7 @@ void ensuresThatRepublicDayIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JUNE, 2), "REPUBLIC_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JUNE, 2), "REPUBLIC_DAY", PUBLIC_HOLIDAY)); } @Property @@ -66,7 +66,7 @@ void ensuresThatAssumptionDayIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), AUGUST, 15), "ASSUMPTION_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), AUGUST, 15), "ASSUMPTION_DAY", PUBLIC_HOLIDAY)); } @Property @@ -75,7 +75,7 @@ void ensuresThatAlLSaintsIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), NOVEMBER, 1), "ALL_SAINTS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), NOVEMBER, 1), "ALL_SAINTS", PUBLIC_HOLIDAY)); } @Property @@ -84,7 +84,7 @@ void ensuresThatImmaculateConceptionIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 8), "IMMACULATE_CONCEPTION", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 8), "IMMACULATE_CONCEPTION", PUBLIC_HOLIDAY)); } @Property @@ -93,8 +93,8 @@ void ensuresThatChristmasIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", OFFICIAL_HOLIDAY)) - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "STEPHENS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", PUBLIC_HOLIDAY)) + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "STEPHENS", PUBLIC_HOLIDAY)); } @Property @@ -103,7 +103,7 @@ void ensuresThatNewYearIsOnFirstJanuarySince1967(@ForAll @YearRange(min = 1967) final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", PUBLIC_HOLIDAY)); } @Property @@ -112,7 +112,7 @@ void ensuresThatNewYearIsNotAPublicHolidayBefore1967(@ForAll @YearRange(max = 19 final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", PUBLIC_HOLIDAY)); } @Property diff --git a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayJETest.java b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayJETest.java index a53f3c3cb..2134c5126 100644 --- a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayJETest.java +++ b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayJETest.java @@ -11,7 +11,7 @@ import java.util.Set; import static de.focus_shift.jollyday.core.HolidayCalendar.JERSEY; -import static de.focus_shift.jollyday.core.HolidayType.OFFICIAL_HOLIDAY; +import static de.focus_shift.jollyday.core.HolidayType.PUBLIC_HOLIDAY; import static de.focus_shift.jollyday.core.ManagerParameters.create; import static java.time.Month.MAY; import static org.assertj.core.api.Assertions.assertThat; @@ -32,7 +32,7 @@ void ensuresThatKingsCoronationForKingCharlesIIIIn2023() { final Set holidays2023 = holidayManager.getHolidays(2023); assertThat(holidays2023) - .contains(new Holiday(LocalDate.of(2023, MAY, 8), "KINGS_CORONATION", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(2023, MAY, 8), "KINGS_CORONATION", PUBLIC_HOLIDAY)); final Set holidays2024 = holidayManager.getHolidays(2024); assertThat(holidays2024) diff --git a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayLITest.java b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayLITest.java index f4a511d5e..dc76e290b 100644 --- a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayLITest.java +++ b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayLITest.java @@ -11,7 +11,7 @@ import java.util.Set; import static de.focus_shift.jollyday.core.HolidayCalendar.LIECHTENSTEIN; -import static de.focus_shift.jollyday.core.HolidayType.OFFICIAL_HOLIDAY; +import static de.focus_shift.jollyday.core.HolidayType.PUBLIC_HOLIDAY; import static de.focus_shift.jollyday.core.ManagerParameters.create; import static java.time.Month.AUGUST; import static java.time.Month.DECEMBER; @@ -31,7 +31,7 @@ void ensuresThatNewYearIsOnFirstJanuaryAndNotConfiguredUntil1966(@ForAll @YearRa final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", PUBLIC_HOLIDAY)); } @Property @@ -40,7 +40,7 @@ void ensuresThatNewYearIsOnFirstJanuaryIsConfiguredSince1967(@ForAll @YearRange( final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", PUBLIC_HOLIDAY)); } @Property @@ -49,7 +49,7 @@ void ensuresThatEpiphanyConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 6), "EPIPHANY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 6), "EPIPHANY", PUBLIC_HOLIDAY)); } @Property @@ -58,7 +58,7 @@ void ensuresThatCandlemasConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), FEBRUARY, 2), "CANDLEMAS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), FEBRUARY, 2), "CANDLEMAS", PUBLIC_HOLIDAY)); } @Property @@ -67,7 +67,7 @@ void ensuresThatStJosephIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), MARCH, 19), "ST_JOSEPH", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), MARCH, 19), "ST_JOSEPH", PUBLIC_HOLIDAY)); } @Property @@ -76,7 +76,7 @@ void ensuresThatMayDayIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 1), "MAY_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 1), "MAY_DAY", PUBLIC_HOLIDAY)); } @Property @@ -85,7 +85,7 @@ void ensuresThatAssumptionDayIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), AUGUST, 15), "ASSUMPTION_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), AUGUST, 15), "ASSUMPTION_DAY", PUBLIC_HOLIDAY)); } @Property @@ -94,7 +94,7 @@ void ensuresThatNativityLadyIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), SEPTEMBER, 8), "NATIVITY_LADY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), SEPTEMBER, 8), "NATIVITY_LADY", PUBLIC_HOLIDAY)); } @Property @@ -103,7 +103,7 @@ void ensuresThatAllSaintsIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), NOVEMBER, 1), "ALL_SAINTS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), NOVEMBER, 1), "ALL_SAINTS", PUBLIC_HOLIDAY)); } @Property @@ -112,7 +112,7 @@ void ensuresThatImmaculateConceptionIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 8), "IMMACULATE_CONCEPTION", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 8), "IMMACULATE_CONCEPTION", PUBLIC_HOLIDAY)); } @Property @@ -121,7 +121,7 @@ void ensuresThatChristmasIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", PUBLIC_HOLIDAY)); } @Property @@ -130,7 +130,7 @@ void ensuresThatStephensIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "STEPHENS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "STEPHENS", PUBLIC_HOLIDAY)); } @Property diff --git a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayLUTest.java b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayLUTest.java index bf210e499..9a034a9ab 100644 --- a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayLUTest.java +++ b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayLUTest.java @@ -11,7 +11,7 @@ import java.util.Set; import static de.focus_shift.jollyday.core.HolidayCalendar.LUXEMBOURG; -import static de.focus_shift.jollyday.core.HolidayType.OFFICIAL_HOLIDAY; +import static de.focus_shift.jollyday.core.HolidayType.PUBLIC_HOLIDAY; import static de.focus_shift.jollyday.core.ManagerParameters.create; import static java.time.Month.AUGUST; import static java.time.Month.DECEMBER; @@ -30,7 +30,7 @@ void ensuresThatNewYearConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", PUBLIC_HOLIDAY)); } @Property @@ -39,7 +39,7 @@ void ensuresThatLabourDayConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 1), "LABOUR_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 1), "LABOUR_DAY", PUBLIC_HOLIDAY)); } @Property @@ -48,7 +48,7 @@ void ensuresThatEuropeDayIsConfiguredSince2019(@ForAll @YearRange(min = 2019) Ye final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 9), "EUROPE_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 9), "EUROPE_DAY", PUBLIC_HOLIDAY)); } @Property @@ -57,7 +57,7 @@ void ensuresThatEuropeDayIsNotConfiguredUntil2018(@ForAll @YearRange(max = 2018) final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), MAY, 9), "EUROPE_DAY", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), MAY, 9), "EUROPE_DAY", PUBLIC_HOLIDAY)); } @Property @@ -66,7 +66,7 @@ void ensuresThatNationalDayIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JUNE, 23), "NATIONAL_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JUNE, 23), "NATIONAL_DAY", PUBLIC_HOLIDAY)); } @Property @@ -75,7 +75,7 @@ void ensuresThatAssumptionDayIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), AUGUST, 15), "ASSUMPTION_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), AUGUST, 15), "ASSUMPTION_DAY", PUBLIC_HOLIDAY)); } @Property @@ -84,7 +84,7 @@ void ensuresThatAllSaintsIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), NOVEMBER, 1), "ALL_SAINTS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), NOVEMBER, 1), "ALL_SAINTS", PUBLIC_HOLIDAY)); } @Property @@ -93,7 +93,7 @@ void ensuresThatChristmasIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", PUBLIC_HOLIDAY)); } @Property @@ -102,7 +102,7 @@ void ensuresThatStephensIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "STEPHENS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "STEPHENS", PUBLIC_HOLIDAY)); } @Property @@ -141,6 +141,6 @@ void ensuresThatCarnivalForCityOfLuxemburgIsConfigured(@ForAll @YearRange Year y final Set holidays = holidayManager.getHolidays(year.getValue(), "lu", "clu"); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), FEBRUARY, 15), "CARNIVAL", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), FEBRUARY, 15), "CARNIVAL", PUBLIC_HOLIDAY)); } } diff --git a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayMDTest.java b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayMDTest.java index e599bf71d..c1453c3ad 100644 --- a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayMDTest.java +++ b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayMDTest.java @@ -11,7 +11,7 @@ import java.util.Set; import static de.focus_shift.jollyday.core.HolidayCalendar.MOLDOVA; -import static de.focus_shift.jollyday.core.HolidayType.OFFICIAL_HOLIDAY; +import static de.focus_shift.jollyday.core.HolidayType.PUBLIC_HOLIDAY; import static de.focus_shift.jollyday.core.ManagerParameters.create; import static java.time.Month.AUGUST; import static java.time.Month.DECEMBER; @@ -29,7 +29,7 @@ void ensuresThatNewYearIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", PUBLIC_HOLIDAY)); } @Property @@ -38,8 +38,8 @@ void ensuresThatOrthodoxChristmasIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 7), "CHRISTMAS_EVE", OFFICIAL_HOLIDAY)) - .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 8), "CHRISTMAS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 7), "CHRISTMAS_EVE", PUBLIC_HOLIDAY)) + .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 8), "CHRISTMAS", PUBLIC_HOLIDAY)); } @Property @@ -58,7 +58,7 @@ void ensuresInternationalWomanDayIsConfiguredSince1977(@ForAll @YearRange(min = final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), MARCH, 8), "INTERNATIONAL_WOMAN", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), MARCH, 8), "INTERNATIONAL_WOMAN", PUBLIC_HOLIDAY)); } @Property @@ -67,7 +67,7 @@ void ensuresThatLabourDayIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 1), "LABOUR_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 1), "LABOUR_DAY", PUBLIC_HOLIDAY)); } @Property @@ -86,7 +86,7 @@ void ensuresThatChildrensDayIsConfiguredSine2016(@ForAll @YearRange(min = 2016) final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JUNE, 1), "CHILDRENS_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JUNE, 1), "CHILDRENS_DAY", PUBLIC_HOLIDAY)); } @Property @@ -115,7 +115,7 @@ void ensuresThatVictoryDayIsConfiguredSince1965(@ForAll @YearRange(min = 1965) Y final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 9), "VICTORY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 9), "VICTORY", PUBLIC_HOLIDAY)); } @Property @@ -134,7 +134,7 @@ void ensuresThatIndependenceDayIsConfiguredSince1991(@ForAll @YearRange(min = 19 final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), AUGUST, 27), "INDEPENDENCE_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), AUGUST, 27), "INDEPENDENCE_DAY", PUBLIC_HOLIDAY)); } @Property @@ -153,7 +153,7 @@ void ensuresThatLanguageDayIsConfiguredSince1990(@ForAll @YearRange(min = 1990) final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), AUGUST, 31), "LANGUAGE_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), AUGUST, 31), "LANGUAGE_DAY", PUBLIC_HOLIDAY)); } @Property @@ -172,7 +172,7 @@ void ensuresThatChristmasIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", PUBLIC_HOLIDAY)); } @Property @@ -181,6 +181,6 @@ void ensuresThatBaltiDayIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue(), "ba"); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 22), "REGIONAL", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 22), "REGIONAL", PUBLIC_HOLIDAY)); } } diff --git a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayNLTest.java b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayNLTest.java index 58e9440a8..1f5649a9f 100644 --- a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayNLTest.java +++ b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayNLTest.java @@ -11,7 +11,7 @@ import java.util.Set; import static de.focus_shift.jollyday.core.HolidayCalendar.NETHERLANDS; -import static de.focus_shift.jollyday.core.HolidayType.OFFICIAL_HOLIDAY; +import static de.focus_shift.jollyday.core.HolidayType.PUBLIC_HOLIDAY; import static de.focus_shift.jollyday.core.ManagerParameters.create; import static java.time.Month.DECEMBER; import static java.time.Month.JANUARY; @@ -26,7 +26,7 @@ void ensuresThatNewYearOnFirstIsConfiguredSince1967(@ForAll @YearRange(min = 196 final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", PUBLIC_HOLIDAY)); } @Property @@ -35,7 +35,7 @@ void ensuresThatNewYearOnSecondIsNotConfiguredUntil1966(@ForAll @YearRange(max = final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", PUBLIC_HOLIDAY)); } @Property @@ -44,7 +44,7 @@ void ensuresThatAllLiberationIsNotConfiguredUntil1944(@ForAll @YearRange(max = 1 final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), MAY, 5), "LIBERATION", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), MAY, 5), "LIBERATION", PUBLIC_HOLIDAY)); } @Property @@ -54,7 +54,7 @@ void ensuresThatAllLiberationIsConfiguredEveryFiveYearsSince1945Until1989(@ForAl if (year.getValue() % 5 == 0) { assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 5), "LIBERATION", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 5), "LIBERATION", PUBLIC_HOLIDAY)); } } @@ -65,7 +65,7 @@ void ensuresThatAllLiberationIsNotConfiguredBetweenEveryFiveYearsSince1945Until1 if (year.getValue() % 5 != 0) { assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), MAY, 5), "LIBERATION", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), MAY, 5), "LIBERATION", PUBLIC_HOLIDAY)); } } @@ -75,7 +75,7 @@ void ensuresThatAllLiberationIsConfiguredUntil1990(@ForAll @YearRange(min = 1990 final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 5), "LIBERATION", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 5), "LIBERATION", PUBLIC_HOLIDAY)); } @Property @@ -84,7 +84,7 @@ void ensuresThatFirstChristmasDayIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "FIRST_CHRISTMAS_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "FIRST_CHRISTMAS_DAY", PUBLIC_HOLIDAY)); } @Property @@ -93,7 +93,7 @@ void ensuresThatSecondChristmasDayIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "SECOND_CHRISTMAS_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "SECOND_CHRISTMAS_DAY", PUBLIC_HOLIDAY)); } @Property diff --git a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayNZTest.java b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayNZTest.java index 55550741d..624ab43cc 100644 --- a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayNZTest.java +++ b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayNZTest.java @@ -12,7 +12,7 @@ import java.util.Set; import static de.focus_shift.jollyday.core.HolidayCalendar.NEW_ZEALAND; -import static de.focus_shift.jollyday.core.HolidayType.OFFICIAL_HOLIDAY; +import static de.focus_shift.jollyday.core.HolidayType.PUBLIC_HOLIDAY; import static de.focus_shift.jollyday.core.ManagerParameters.create; import static java.time.Month.SEPTEMBER; import static org.assertj.core.api.Assertions.assertThat; @@ -57,7 +57,7 @@ void ensuresThatQueenElisabethIIMemorialDayIsNotConfiguredUntil2021(@ForAll @Yea final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), SEPTEMBER, 26), "QUEEN_ELIZABETH_II_MEMORIAL_DAY", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), SEPTEMBER, 26), "QUEEN_ELIZABETH_II_MEMORIAL_DAY", PUBLIC_HOLIDAY)); } @Property @@ -66,7 +66,7 @@ void ensuresThatQueenElisabethIIMemorialDayIsConfiguredIn2022(@ForAll @YearRange final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), SEPTEMBER, 26), "QUEEN_ELIZABETH_II_MEMORIAL_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), SEPTEMBER, 26), "QUEEN_ELIZABETH_II_MEMORIAL_DAY", PUBLIC_HOLIDAY)); } @Property @@ -75,6 +75,6 @@ void ensuresThatQueenElisabethIIMemorialDayIsConfiguredSince2023(@ForAll @YearRa final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), SEPTEMBER, 26), "QUEEN_ELIZABETH_II_MEMORIAL_DAY", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), SEPTEMBER, 26), "QUEEN_ELIZABETH_II_MEMORIAL_DAY", PUBLIC_HOLIDAY)); } } diff --git a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayROTest.java b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayROTest.java index 9fe12dda1..4dbacbb37 100644 --- a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayROTest.java +++ b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayROTest.java @@ -13,7 +13,7 @@ import java.util.Set; import static de.focus_shift.jollyday.core.HolidayCalendar.ROMANIA; -import static de.focus_shift.jollyday.core.HolidayType.OFFICIAL_HOLIDAY; +import static de.focus_shift.jollyday.core.HolidayType.PUBLIC_HOLIDAY; import static de.focus_shift.jollyday.core.ManagerParameters.create; import static java.time.Month.AUGUST; import static java.time.Month.DECEMBER; @@ -40,8 +40,8 @@ void ensuresThatNewYearIsConfigured(@ForAll @YearRange Year year) { assertThat(holidays) .isNotEmpty() .contains( - new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", OFFICIAL_HOLIDAY), - new Holiday(LocalDate.of(year.getValue(), JANUARY, 2), "NEW_YEAR", OFFICIAL_HOLIDAY) + new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", PUBLIC_HOLIDAY), + new Holiday(LocalDate.of(year.getValue(), JANUARY, 2), "NEW_YEAR", PUBLIC_HOLIDAY) ); } @@ -103,7 +103,7 @@ void ensuresThatUnificationDayIsConfiguredSince2017(@ForAll @YearRange(min = 201 final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 24), "UNIFICATION", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 24), "UNIFICATION", PUBLIC_HOLIDAY)); } @Property @@ -113,7 +113,7 @@ void ensuresThatLabourDayIsConfigured(@ForAll @YearRange Year year) { assertThat(holidays) .isNotEmpty() .contains( - new Holiday(LocalDate.of(year.getValue(), MAY, 1), "LABOUR_DAY", OFFICIAL_HOLIDAY) + new Holiday(LocalDate.of(year.getValue(), MAY, 1), "LABOUR_DAY", PUBLIC_HOLIDAY) ); } @@ -134,7 +134,7 @@ void ensuresThatChildrensDayIsConfiguredSince2017(@ForAll @YearRange(min = 2017) assertThat(holidays) .isNotEmpty() .contains( - new Holiday(LocalDate.of(year.getValue(), JUNE, 1), "CHILDRENS_DAY", OFFICIAL_HOLIDAY) + new Holiday(LocalDate.of(year.getValue(), JUNE, 1), "CHILDRENS_DAY", PUBLIC_HOLIDAY) ); } @@ -145,7 +145,7 @@ void ensuresThatNavyDayIsConfigured(@ForAll @YearRange Year year) { assertThat(holidays) .isNotEmpty() .contains( - new Holiday(LocalDate.of(year.getValue(), AUGUST, 15), "NAVY_DAY", OFFICIAL_HOLIDAY) + new Holiday(LocalDate.of(year.getValue(), AUGUST, 15), "NAVY_DAY", PUBLIC_HOLIDAY) ); } @@ -156,7 +156,7 @@ void ensuresThatStAndrewDayIsConfigured(@ForAll @YearRange Year year) { assertThat(holidays) .isNotEmpty() .contains( - new Holiday(LocalDate.of(year.getValue(), NOVEMBER, 30), "ST_ANDREW", OFFICIAL_HOLIDAY) + new Holiday(LocalDate.of(year.getValue(), NOVEMBER, 30), "ST_ANDREW", PUBLIC_HOLIDAY) ); } @@ -167,7 +167,7 @@ void ensuresThatNationalDayIsConfigured(@ForAll @YearRange Year year) { assertThat(holidays) .isNotEmpty() .contains( - new Holiday(LocalDate.of(year.getValue(), DECEMBER, 1), "NATIONAL_DAY", OFFICIAL_HOLIDAY) + new Holiday(LocalDate.of(year.getValue(), DECEMBER, 1), "NATIONAL_DAY", PUBLIC_HOLIDAY) ); } @@ -178,8 +178,8 @@ void ensuresThatChristmasIsConfigured(@ForAll @YearRange Year year) { assertThat(holidays) .isNotEmpty() .contains( - new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", OFFICIAL_HOLIDAY), - new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "CHRISTMAS", OFFICIAL_HOLIDAY) + new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", PUBLIC_HOLIDAY), + new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "CHRISTMAS", PUBLIC_HOLIDAY) ); } diff --git a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayRSTest.java b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayRSTest.java index fad685c51..4d9b8a395 100644 --- a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayRSTest.java +++ b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayRSTest.java @@ -13,7 +13,7 @@ import java.util.Set; import static de.focus_shift.jollyday.core.HolidayCalendar.SERBIA; -import static de.focus_shift.jollyday.core.HolidayType.OFFICIAL_HOLIDAY; +import static de.focus_shift.jollyday.core.HolidayType.PUBLIC_HOLIDAY; import static de.focus_shift.jollyday.core.ManagerParameters.create; import static java.time.DayOfWeek.SUNDAY; import static java.time.Month.FEBRUARY; @@ -32,7 +32,7 @@ void ensuresThatNewYearFirstIsConfiguredAndIfOnSundayMovesToMondayAndTuesday(@Fo final LocalDate firstNewYear = LocalDate.of(year.getValue(), JANUARY, 1); final LocalDate secondNewYear = LocalDate.of(year.getValue(), JANUARY, 2); - checkSundayMovingToNextWorkday(holidays, firstNewYear, secondNewYear, "NEW_YEAR", OFFICIAL_HOLIDAY); + checkSundayMovingToNextWorkday(holidays, firstNewYear, secondNewYear, "NEW_YEAR", PUBLIC_HOLIDAY); } @Property @@ -42,7 +42,7 @@ void ensuresThatStateHoodIsConfiguredAndIfOnSundayMovesToMondayAndTuesday(@ForAl final LocalDate firstStateHood = LocalDate.of(year.getValue(), FEBRUARY, 15); final LocalDate secondStateHood = LocalDate.of(year.getValue(), FEBRUARY, 16); - checkSundayMovingToNextWorkday(holidays, firstStateHood, secondStateHood, "STATEHOOD", OFFICIAL_HOLIDAY); + checkSundayMovingToNextWorkday(holidays, firstStateHood, secondStateHood, "STATEHOOD", PUBLIC_HOLIDAY); } @Property @@ -52,7 +52,7 @@ void ensuresThatLabourDayIsConfiguredAndIfOnSundayMovesToMondayAndTuesday(@ForAl final LocalDate firstLabourDay = LocalDate.of(year.getValue(), MAY, 1); final LocalDate secondLabourDay = LocalDate.of(year.getValue(), MAY, 2); - checkSundayMovingToNextWorkday(holidays, firstLabourDay, secondLabourDay, "LABOUR_DAY", OFFICIAL_HOLIDAY); + checkSundayMovingToNextWorkday(holidays, firstLabourDay, secondLabourDay, "LABOUR_DAY", PUBLIC_HOLIDAY); } @Property @@ -64,11 +64,11 @@ void ensuresThatArmisticeIsConfiguredAndIfOnSundayMovesToMonday(@ForAll @YearRan if (isSunday(armistice)) { assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), NOVEMBER, 12), "ARMISTICE", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), NOVEMBER, 12), "ARMISTICE", PUBLIC_HOLIDAY)); } else { assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), NOVEMBER, 11), "ARMISTICE", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), NOVEMBER, 11), "ARMISTICE", PUBLIC_HOLIDAY)); } } @@ -78,7 +78,7 @@ void ensuresThatOrthodoxChristmasIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 7), "CHRISTMAS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 7), "CHRISTMAS", PUBLIC_HOLIDAY)); } @Property diff --git a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidaySITest.java b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidaySITest.java index 71aa701e3..2a3b98d48 100644 --- a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidaySITest.java +++ b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidaySITest.java @@ -11,7 +11,7 @@ import java.util.Set; import static de.focus_shift.jollyday.core.HolidayCalendar.SLOWENIA; -import static de.focus_shift.jollyday.core.HolidayType.OFFICIAL_HOLIDAY; +import static de.focus_shift.jollyday.core.HolidayType.PUBLIC_HOLIDAY; import static de.focus_shift.jollyday.core.ManagerParameters.create; import static java.time.Month.APRIL; import static java.time.Month.AUGUST; @@ -32,7 +32,7 @@ void ensuresThatNewYearOnFirstIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "NEW_YEAR", PUBLIC_HOLIDAY)); } @Property @@ -41,7 +41,7 @@ void ensuresThatNewYearOnSecondIsConfiguredSince1955AndUntil2012(@ForAll @YearRa final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 2), "NEW_YEAR", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JANUARY, 2), "NEW_YEAR", PUBLIC_HOLIDAY)); } @Property @@ -50,7 +50,7 @@ void ensuresThatNewYearOnSecondIsNotConfiguredBefore1955(@ForAll @YearRange(max final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), JANUARY, 2), "NEW_YEAR", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), JANUARY, 2), "NEW_YEAR", PUBLIC_HOLIDAY)); } @Property @@ -59,7 +59,7 @@ void ensuresThatNewYearOnSecondIsNotConfiguredBetween2013And2016(@ForAll @YearRa final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), JANUARY, 2), "NEW_YEAR", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), JANUARY, 2), "NEW_YEAR", PUBLIC_HOLIDAY)); } @Property @@ -68,7 +68,7 @@ void ensuresThatPreserenDayIsConfiguredSince1991(@ForAll @YearRange(min = 1991) final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), FEBRUARY, 8), "PRESEREN", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), FEBRUARY, 8), "PRESEREN", PUBLIC_HOLIDAY)); } @Property @@ -77,7 +77,7 @@ void ensuresThatPreserenDayIsNotConfiguredUntil1990(@ForAll @YearRange(max = 199 final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "PRESEREN", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), JANUARY, 1), "PRESEREN", PUBLIC_HOLIDAY)); } @Property @@ -86,7 +86,7 @@ void ensuresThatLiberationDayIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), APRIL, 27), "LIBERATION", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), APRIL, 27), "LIBERATION", PUBLIC_HOLIDAY)); } @Property @@ -95,8 +95,8 @@ void ensuresThatLabourDayIsConfiguredSince1949(@ForAll @YearRange(min = 1949) Ye final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 1), "LABOUR_DAY", OFFICIAL_HOLIDAY)) - .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 2), "LABOUR_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 1), "LABOUR_DAY", PUBLIC_HOLIDAY)) + .contains(new Holiday(LocalDate.of(year.getValue(), MAY, 2), "LABOUR_DAY", PUBLIC_HOLIDAY)); } @Property @@ -105,8 +105,8 @@ void ensuresThatLabourDayIsNotConfiguredUntil1948(@ForAll @YearRange(max = 1948) final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), MAY, 1), "LABOUR_DAY", OFFICIAL_HOLIDAY)) - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), MAY, 2), "LABOUR_DAY", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), MAY, 1), "LABOUR_DAY", PUBLIC_HOLIDAY)) + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), MAY, 2), "LABOUR_DAY", PUBLIC_HOLIDAY)); } @Property @@ -115,7 +115,7 @@ void ensuresThatStateHoodIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), JUNE, 25), "STATEHOOD", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), JUNE, 25), "STATEHOOD", PUBLIC_HOLIDAY)); } @Property @@ -124,7 +124,7 @@ void ensuresThatSolidarityDayIsNotConfiguredUntil2022(@ForAll @YearRange(max = 2 final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), AUGUST, 14), "SOLIDARITY_DAY", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), AUGUST, 14), "SOLIDARITY_DAY", PUBLIC_HOLIDAY)); } @Property @@ -133,7 +133,7 @@ void ensuresThatSolidarityDayIsConfiguredIn2023(@ForAll @YearRange(min = 2023, m final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), AUGUST, 14), "SOLIDARITY_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), AUGUST, 14), "SOLIDARITY_DAY", PUBLIC_HOLIDAY)); } @Property @@ -142,7 +142,7 @@ void ensuresThatSolidarityDayIsNotConfiguredSince2024(@ForAll @YearRange(min = 2 final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), AUGUST, 14), "SOLIDARITY_DAY", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), AUGUST, 14), "SOLIDARITY_DAY", PUBLIC_HOLIDAY)); } @Property @@ -151,7 +151,7 @@ void ensuresThatAssumptionDayIsConfiguredSince1992(@ForAll @YearRange(min = 1992 final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), AUGUST, 15), "ASSUMPTION_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), AUGUST, 15), "ASSUMPTION_DAY", PUBLIC_HOLIDAY)); } @Property @@ -160,7 +160,7 @@ void ensuresThatAssumptionDayIsNotConfiguredUntil1991(@ForAll @YearRange(max = 1 final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), AUGUST, 15), "ASSUMPTION_DAY", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), AUGUST, 15), "ASSUMPTION_DAY", PUBLIC_HOLIDAY)); } @Property @@ -169,7 +169,7 @@ void ensuresThatReformationDayIsConfiguredSince1992(@ForAll @YearRange(min = 199 final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), OCTOBER, 31), "REFORMATION_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), OCTOBER, 31), "REFORMATION_DAY", PUBLIC_HOLIDAY)); } @Property @@ -178,7 +178,7 @@ void ensuresThatReformationDayIsNotConfiguredUntil1991(@ForAll @YearRange(max = final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), OCTOBER, 31), "REFORMATION_DAY", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), OCTOBER, 31), "REFORMATION_DAY", PUBLIC_HOLIDAY)); } @Property @@ -187,7 +187,7 @@ void ensuresThatAllSaintsIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), NOVEMBER, 1), "ALL_SAINTS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), NOVEMBER, 1), "ALL_SAINTS", PUBLIC_HOLIDAY)); } @Property @@ -196,7 +196,7 @@ void ensuresThatChristmasIsConfiguredUntil1952(@ForAll @YearRange(max = 1952) Ye final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", PUBLIC_HOLIDAY)); } @Property @@ -205,7 +205,7 @@ void ensuresThatChristmasIsConfiguredSince1991(@ForAll @YearRange(min = 1991) Ye final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", PUBLIC_HOLIDAY)); } @Property @@ -214,7 +214,7 @@ void ensuresThatChristmasIsNotConfiguredSince1953Until1990(@ForAll @YearRange(mi final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .doesNotContain(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", OFFICIAL_HOLIDAY)); + .doesNotContain(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", PUBLIC_HOLIDAY)); } @Property @@ -223,7 +223,7 @@ void ensuresThatIndependenceIsConfigured(@ForAll @YearRange Year year) { final Set holidays = holidayManager.getHolidays(year.getValue()); assertThat(holidays) .isNotEmpty() - .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "INDEPENDENCE_DAY", OFFICIAL_HOLIDAY)); + .contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "INDEPENDENCE_DAY", PUBLIC_HOLIDAY)); } @Property