Repository: focus-shift/jollyday (java)

Issue:
Bruderklausenfest missing in Oberwalden
### Affected country

Swizerland - Obwalden

### Affected public holiday

Bruderklausenfest

### Source of the information

https://www.bj.admin.ch/dam/bj/de/data/publiservice/service/zivilprozessrecht/kant-feiertage.pdf.download.pdf/kant-feiertage.pdf
https://de.wikipedia.org/wiki/Feiertage_in_der_Schweiz
https://www.feiertagskalender.ch/index.php?geo=1604&jahr=2023&klasse=5&hl=de
https://www.seco.admin.ch/dam/seco/de/dokumente/Arbeit/Arbeitsbedingungen/Arbeitsgesetz%20und%20Verordnungen/Feiertage-Schweiz.pdf.download.pdf/Feiertage_2015_web_de.pdf

### More information

_No response_

Pull request:
Add st nicholas to ch obwalden
closes #369 

Patch:
diff --git a/jollyday-core/src/main/resources/holidays/Holidays_ch.xml b/jollyday-core/src/main/resources/holidays/Holidays_ch.xml
index 39301837..51c85de1 100644
--- a/jollyday-core/src/main/resources/holidays/Holidays_ch.xml
+++ b/jollyday-core/src/main/resources/holidays/Holidays_ch.xml
@@ -175,6 +175,7 @@
     <Holidays>
       <Fixed month="JANUARY" day="2" descriptionPropertiesKey="ST_BERCHTHOLD"/>
       <Fixed month="AUGUST" day="15" descriptionPropertiesKey="ASSUMPTION_DAY"/>
+      <Fixed month="SEPTEMBER" day="25" validFrom="1947" descriptionPropertiesKey="ST_NICHOLAS"/>
       <Fixed month="NOVEMBER" day="1" descriptionPropertiesKey="ALL_SAINTS"/>
       <Fixed month="DECEMBER" day="8" descriptionPropertiesKey="IMMACULATE_CONCEPTION"/>
       <Fixed month="DECEMBER" day="26" descriptionPropertiesKey="STEPHENS"/>


Test patch:
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 d24ba020..ef9241a8 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
@@ -1,8 +1,25 @@
 package de.focus_shift.jollyday.tests.country;
 
+import de.focus_shift.jollyday.core.Holiday;
+import de.focus_shift.jollyday.core.HolidayManager;
 import de.focus_shift.jollyday.tests.country.base.AbstractCountryTestBase;
+import net.jqwik.api.ForAll;
+import net.jqwik.api.Property;
+import net.jqwik.time.api.constraints.YearRange;
 import org.junit.jupiter.api.Test;
 
+import java.time.LocalDate;
+import java.time.Year;
+import java.util.Set;
+
+import static de.focus_shift.jollyday.core.HolidayCalendar.CZECH_REPUBLIC;
+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.ManagerParameters.create;
+import static java.time.Month.MAY;
+import static java.time.Month.SEPTEMBER;
+import static org.assertj.core.api.Assertions.assertThat;
+
 class HolidayCHTest extends AbstractCountryTestBase {
 
   private static final String ISO_CODE = "ch";
@@ -11,4 +28,23 @@ class HolidayCHTest extends AbstractCountryTestBase {
   void testManagerCHStructure() {
     validateCalendarData(ISO_CODE, 2022, true);
   }
+
+
+  @Property
+  void ensuresThatStNicholasIsNotConfiguredInObwaldenUntil1946(@ForAll @YearRange(max = 1946) Year year) {
+    final HolidayManager holidayManager = HolidayManager.getInstance(create(SWITZERLAND));
+    final Set<Holiday> holidays = holidayManager.getHolidays(year.getValue(), "ow");
+    assertThat(holidays)
+      .isNotEmpty()
+      .doesNotContain(new Holiday(LocalDate.of(year.getValue(), SEPTEMBER, 25), "ST_NICHOLAS", OFFICIAL_HOLIDAY));
+  }
+
+  @Property
+  void ensuresThatStNicholasIsConfiguredInObwalden(@ForAll @YearRange(min = 1947) Year year) {
+    final HolidayManager holidayManager = HolidayManager.getInstance(create(SWITZERLAND));
+    final Set<Holiday> holidays = holidayManager.getHolidays(year.getValue(), "ow");
+    assertThat(holidays)
+      .isNotEmpty()
+      .contains(new Holiday(LocalDate.of(year.getValue(), SEPTEMBER, 25), "ST_NICHOLAS", OFFICIAL_HOLIDAY));
+  }
 }
diff --git a/jollyday-tests/src/test/resources/holidays/Holidays_test_ch_2022.xml b/jollyday-tests/src/test/resources/holidays/Holidays_test_ch_2022.xml
index ea29e004..ef2e7a5f 100644
--- a/jollyday-tests/src/test/resources/holidays/Holidays_test_ch_2022.xml
+++ b/jollyday-tests/src/test/resources/holidays/Holidays_test_ch_2022.xml
@@ -167,6 +167,7 @@
     <Holidays>
       <Fixed month="JANUARY" day="2" descriptionPropertiesKey="ST_BERCHTHOLD"/>
       <Fixed month="AUGUST" day="15" descriptionPropertiesKey="ASSUMPTION_DAY"/>
+      <Fixed month="SEPTEMBER" day="25" descriptionPropertiesKey="ST_NICHOLAS"/>
       <Fixed month="NOVEMBER" day="1" descriptionPropertiesKey="ALL_SAINTS"/>
       <Fixed month="DECEMBER" day="8" descriptionPropertiesKey="IMMACULATE_CONCEPTION"/>
       <Fixed month="DECEMBER" day="26" descriptionPropertiesKey="STEPHENS"/>