From ea8f4cfdcede410fd6d4220290a8c5c23e72e56e Mon Sep 17 00:00:00 2001 From: Tobias Schneider Date: Tue, 24 Dec 2024 11:24:49 +0100 Subject: [PATCH] Fix to latest version --- jollyday-pojo-generator/pom.xml | 2 +- jollyday-pojo/pom.xml | 2 +- .../pojo/test/PojoConfigurationServiceTest.java | 11 ++++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/jollyday-pojo-generator/pom.xml b/jollyday-pojo-generator/pom.xml index 00281513d..99a2f7fd0 100644 --- a/jollyday-pojo-generator/pom.xml +++ b/jollyday-pojo-generator/pom.xml @@ -5,7 +5,7 @@ de.focus-shift jollyday - 0.28.0-SNAPSHOT + 1.2.0-SNAPSHOT ../pom.xml diff --git a/jollyday-pojo/pom.xml b/jollyday-pojo/pom.xml index d606bbcd7..22d23f925 100644 --- a/jollyday-pojo/pom.xml +++ b/jollyday-pojo/pom.xml @@ -10,7 +10,7 @@ de.focus-shift jollyday - 0.28.0-SNAPSHOT + 1.2.0-SNAPSHOT ../pom.xml diff --git a/jollyday-pojo/src/test/java/de/focus_shift/jollyday/pojo/test/PojoConfigurationServiceTest.java b/jollyday-pojo/src/test/java/de/focus_shift/jollyday/pojo/test/PojoConfigurationServiceTest.java index 3c218a182..6cb15b35e 100644 --- a/jollyday-pojo/src/test/java/de/focus_shift/jollyday/pojo/test/PojoConfigurationServiceTest.java +++ b/jollyday-pojo/src/test/java/de/focus_shift/jollyday/pojo/test/PojoConfigurationServiceTest.java @@ -7,7 +7,6 @@ import org.junit.jupiter.api.Test; import de.focus_shift.jollyday.core.HolidayManager; -import de.focus_shift.jollyday.core.HolidayType; import de.focus_shift.jollyday.core.ManagerParameter; import de.focus_shift.jollyday.core.ManagerParameters; import de.focus_shift.jollyday.core.spi.Configuration; @@ -15,6 +14,8 @@ import de.focus_shift.jollyday.pojo.PojoConfigurationService; import de.focus_shift.jollyday.pojo.PojoFixed; +import static de.focus_shift.jollyday.core.HolidayType.OBSERVANCE; + class PojoConfigurationServiceTest { @Test @@ -24,16 +25,16 @@ void enhancePojoConfigurationServiceWithSpecialHoliday() { ManagerParameter parameter = ManagerParameters.create("de"); HolidayManager holidayManager = HolidayManager.getInstance(parameter); - Assertions.assertFalse(holidayManager.isHoliday(LocalDate.of(2022, 03, 22)), "Precondition 22.3 should be no holiday"); + Assertions.assertFalse(holidayManager.isHoliday(LocalDate.of(2022, 3, 22)), "Precondition 22.3 should be no holiday"); // add new holiday for 22.3 dynamically via code/api Configuration configuration = javaConfigurationService.getConfiguration(parameter); - PojoFixed stgandulfholiday = new PojoFixed("St.Gandulf's Day", HolidayType.UNOFFICIAL_HOLIDAY, null, null, YearCycle.EVERY_YEAR, null, MonthDay.of(3, 22)); + PojoFixed stgandulfholiday = new PojoFixed("St.Gandulf's Day", OBSERVANCE, null, null, YearCycle.EVERY_YEAR, null, MonthDay.of(3, 22)); configuration.holidays().fixed().add(stgandulfholiday); - HolidayManager.clearManagerCache(); // we have to clear the manager cache because otherwise the holidaymanager from above with old configuration would be reused. + HolidayManager.clearManagerCache(); // we have to clear the manager cache because otherwise the holiday manager from above with old configuration would be reused. holidayManager = HolidayManager.getInstance(parameter); - Assertions.assertTrue(holidayManager.isHoliday(LocalDate.of(2022, 03, 22), HolidayType.UNOFFICIAL_HOLIDAY), "Ensure newly added holiday is recognized"); + Assertions.assertTrue(holidayManager.isHoliday(LocalDate.of(2022, 3, 22), OBSERVANCE), "Ensure newly added holiday is recognized"); } }