Repository: focus-shift/jollyday (java)

Issue:
Switzerland: Berchtold's Day as bank holiday for ch
### Affected country

Switzerland

### Affected public holiday

Berchtold's Day

### Source of the information

https://de.wikipedia.org/wiki/Feiertage_in_der_Schweiz#Nationale_und_allgemeine_Feiertage

### More information

As part of #655, which aimed to improve Switzerland according to https://en.wikipedia.org/wiki/Public_holidays_in_Switzerland, Berchtold's day was removed from Cantons that correctly had it configured:

* Glarus
* Luzern
* Neuchâtel
* Solothurn
* Zug
* Zürich

Instead, it should have been added to the ones for which it is still missing:

* Jura
* Obwalden

Pull request description:
switzerland: add ST_BERCHTHOLD as bank holiday to ch
closes #734

<!--

Thanks for contributing.
Please review the following notes before submitting you pull request.

Please look for other issues or pull requests which already work on this topic. Is somebody already on it? Do you need to synchronize?

# Security Vulnerabilities

🛑 STOP! 🛑 If your contribution fixes a security vulnerability, please do not submit it.
Instead, please write an E-Mail to to one of the maintainer with all the information
to recreate the security vulnerability.

# Describing Your Changes

If, having reviewed the notes above, you're ready to submit your pull request, please
provide a brief description of the proposed changes.

If they:
 🐞 fix a bug, please describe the broken behaviour and how the changes fix it.
    Please label with 'type: bug' and 'status: new'
    
 🎁 make an enhancement, please describe the new functionality and why you believe it's useful.
    Please label with 'type: enhancement' and 'status: new'
 
If your pull request relates to any existing issues,
please reference them by using the issue number prefixed with #.

-->


Patch:
diff --git a/jollyday-core/src/main/resources/holidays/Holidays_ch.xml b/jollyday-core/src/main/resources/holidays/Holidays_ch.xml
index 08bbb7da..4a76eea2 100644
--- a/jollyday-core/src/main/resources/holidays/Holidays_ch.xml
+++ b/jollyday-core/src/main/resources/holidays/Holidays_ch.xml
@@ -6,6 +6,7 @@
                xsi:schemaLocation="https://focus_shift.de/jollyday/schema/holiday https://focus_shift.de/jollyday/schema/holiday/holiday.xsd">
   <Holidays>
     <Fixed month="JANUARY" day="1" descriptionPropertiesKey="NEW_YEAR"/>
+    <Fixed month="JANUARY" day="2" descriptionPropertiesKey="ST_BERCHTHOLD" localizedType="BANK_HOLIDAY"/>
     <Fixed month="AUGUST" day="1" descriptionPropertiesKey="NATIONAL_DAY"/>
     <Fixed month="DECEMBER" day="25" descriptionPropertiesKey="CHRISTMAS"/>
     <ChristianHoliday type="ASCENSION_DAY" descriptionPropertiesKey="christian.ASCENSION_DAY"/>
@@ -15,6 +16,7 @@
   <Sources>
     <Source of="ISO 3166">https://www.iso.org/obp/ui/#iso:code:3166:CH</Source>
     <Source of="ISO 3166-2">https://en.wikipedia.org/wiki/ISO_3166-2:CH</Source>
+    <Source of="ST Berchthold as bank holiday">https://www.six-group.com/de/market-data/news-tools/trading-currency-holiday-calendar.html</Source>
   </Sources>
 
   <SubConfigurations hierarchy="ag" description="Aargau">


Test patch:
diff --git a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/CalendarChecker.java b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/CalendarChecker.java
index 637b7d8e..4e977acd 100644
--- a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/CalendarChecker.java
+++ b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/CalendarChecker.java
@@ -14,6 +14,7 @@ import java.time.Month;
 import java.time.Year;
 import java.time.temporal.TemporalAdjusters;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Objects;
 import java.util.Set;
@@ -188,6 +189,7 @@ public class CalendarChecker implements CalendarCheckerApi.Holiday, CalendarChec
 
             assertThat(holidays)
               .isNotEmpty()
+              .as(() -> "Failure in a holiday for " + holidayManager.getManagerParameter().getDisplayName() + " " + Arrays.toString(check.getSubdivisions()))
               .doesNotContain(new Holiday(date, check.getPropertiesKey(), check.getHolidayType()));
           }
         );
@@ -204,6 +206,7 @@ public class CalendarChecker implements CalendarCheckerApi.Holiday, CalendarChec
 
             assertThat(holidays)
               .isNotEmpty()
+              .as(() -> "Failure in a holiday for " + holidayManager.getManagerParameter().getDisplayName() + " " + Arrays.toString(check.getSubdivisions()))
               .contains(new Holiday(date, check.getPropertiesKey(), check.getHolidayType()));
           }
         );
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 49bdb722..147b4877 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
@@ -2,13 +2,15 @@ package de.focus_shift.jollyday.tests.country;
 
 import org.junit.jupiter.api.Test;
 
-
 import static de.focus_shift.jollyday.core.HolidayCalendar.SWITZERLAND;
+import static de.focus_shift.jollyday.core.HolidayType.BANK_HOLIDAY;
+import static de.focus_shift.jollyday.core.HolidayType.OBSERVANCE;
 import static de.focus_shift.jollyday.tests.CalendarCheckerApi.assertFor;
 import static java.time.Month.AUGUST;
 import static java.time.Month.DECEMBER;
 import static java.time.Month.JANUARY;
 import static java.time.Month.MARCH;
+import static java.time.Month.MAY;
 import static java.time.Month.NOVEMBER;
 
 
@@ -18,6 +20,7 @@ class HolidayCHTest {
   void ensuresHolidays() {
     assertFor(SWITZERLAND)
       .hasFixedHoliday("NEW_YEAR", JANUARY, 1).and()
+      .hasFixedHoliday("ST_BERCHTHOLD", JANUARY, 2, BANK_HOLIDAY).and()
       .hasFixedHoliday("NATIONAL_DAY", AUGUST, 1).and()
       .hasFixedHoliday("CHRISTMAS", DECEMBER, 25).and()
       .hasChristianHoliday("ASCENSION_DAY").and()
@@ -45,7 +48,72 @@ class HolidayCHTest {
       .hasFixedHoliday("ASSUMPTION_DAY", AUGUST, 15).inSubdivision("vs").and()
       .hasFixedHoliday("ALL_SAINTS", NOVEMBER, 1).inSubdivision("vs").and()
       .hasFixedHoliday("IMMACULATE_CONCEPTION", DECEMBER, 8).inSubdivision("vs").and()
-      .hasChristianHoliday("CORPUS_CHRISTI").inSubdivision("vs")
+      .hasChristianHoliday("CORPUS_CHRISTI").inSubdivision("vs").and()
+
+
+      /*Aargau*/
+      /*Innerrhoden*/
+      /*Ausserrhoden*/
+
+      /*Bern*/
+      .hasFixedHoliday("ST_BERCHTHOLD", JANUARY, 2).inSubdivision("be").and()
+      .hasFixedHoliday("STEPHENS", DECEMBER, 26).inSubdivision("be").and()
+      .hasChristianHoliday("GOOD_FRIDAY").inSubdivision("be").and()
+      .hasChristianHoliday("WHIT_MONDAY").inSubdivision("be").and()
+
+      /*Basel-Landschaft*/
+      /*Basel-Stadt*/
+
+      /*Freiburg*/
+      .hasFixedHoliday("ST_BERCHTHOLD", JANUARY, 2).inSubdivision("fr").and()
+      .hasFixedHoliday("ASSUMPTION_DAY", AUGUST, 15).inSubdivision("fr").and()
+      .hasFixedHoliday("ALL_SAINTS", NOVEMBER, 1).inSubdivision("fr").and()
+      .hasFixedHoliday("IMMACULATE_CONCEPTION", DECEMBER, 8).inSubdivision("fr").and()
+      .hasFixedHoliday("STEPHENS", DECEMBER, 26).inSubdivision("fr").and()
+      .hasChristianHoliday("GOOD_FRIDAY").inSubdivision("fr").and()
+      .hasChristianHoliday("EASTER_MONDAY").inSubdivision("fr").and()
+      .hasChristianHoliday("WHIT_MONDAY").inSubdivision("fr").and()
+      .hasChristianHoliday("CORPUS_CHRISTI").inSubdivision("fr").and()
+
+      /*Genève*/
+      /*Glarus*/
+      /*Graubünden*/
+      /*Jura*/
+      /*Luzern*/
+      /*Neuchâtel*/
+      /*Nidwalden*/
+      /*Obwalden*/
+      /*Gallen*/
+
+      /*Schaffhausen*/
+      .hasFixedHoliday("ST_BERCHTHOLD", JANUARY, 2).inSubdivision("sh").and()
+      .hasFixedHoliday("LABOUR_DAY", MAY, 1).inSubdivision("sh").and()
+      .hasFixedHoliday("STEPHENS", DECEMBER, 26).inSubdivision("sh").and()
+      .hasChristianHoliday("GOOD_FRIDAY").inSubdivision("sh").and()
+      .hasChristianHoliday("WHIT_MONDAY").inSubdivision("sh").and()
+
+      /*Solothurn*/
+      /*Schwyz*/
+
+      /*Thurgau*/
+      .hasFixedHoliday("ST_BERCHTHOLD", JANUARY, 2).inSubdivision("tg").and()
+      .hasFixedHoliday("LABOUR_DAY", MAY, 1, OBSERVANCE).inSubdivision("tg").and()
+      .hasFixedHoliday("STEPHENS", DECEMBER, 26).inSubdivision("tg").and()
+      .hasChristianHoliday("GOOD_FRIDAY").inSubdivision("tg").and()
+      .hasChristianHoliday("WHIT_MONDAY").inSubdivision("tg").and()
+
+      /*Ticino*/
+      /*Uri*/
+
+      /*Vaud*/
+      .hasFixedHoliday("ST_BERCHTHOLD", JANUARY, 2).inSubdivision("vd").and()
+      .hasChristianHoliday("GOOD_FRIDAY").inSubdivision("vd").and()
+      .hasChristianHoliday("EASTER_MONDAY").inSubdivision("vd").and()
+      .hasChristianHoliday("WHIT_MONDAY").inSubdivision("vd")
+
+      /*Valais*/
+      /*Zug*/
+      /*Zürich*/
 
       .check();
   }