@@ -67,6 +67,28 @@ class ThemeUtilsTest : AbstractTest() {
6767 pickThemeForDate(LocalDate .of(2026 , Month .APRIL , 6 )) shouldBe null
6868 }
6969
70+ @Test
71+ fun `Should pick oktoberfest for the relevant dates` () {
72+ pickThemeForDate(LocalDate .of(2026 , Month .SEPTEMBER , 18 )) shouldBe null
73+ pickThemeForDate(LocalDate .of(2026 , Month .SEPTEMBER , 19 )) shouldBe Themes .OKTOBERFEST
74+ pickThemeForDate(LocalDate .of(2026 , Month .SEPTEMBER , 20 )) shouldBe Themes .OKTOBERFEST
75+ pickThemeForDate(LocalDate .of(2026 , Month .SEPTEMBER , 21 )) shouldBe Themes .OKTOBERFEST
76+ pickThemeForDate(LocalDate .of(2026 , Month .SEPTEMBER , 22 )) shouldBe Themes .OKTOBERFEST
77+ pickThemeForDate(LocalDate .of(2026 , Month .SEPTEMBER , 23 )) shouldBe Themes .OKTOBERFEST
78+ pickThemeForDate(LocalDate .of(2026 , Month .SEPTEMBER , 24 )) shouldBe Themes .OKTOBERFEST
79+ pickThemeForDate(LocalDate .of(2026 , Month .SEPTEMBER , 25 )) shouldBe Themes .OKTOBERFEST
80+ pickThemeForDate(LocalDate .of(2026 , Month .SEPTEMBER , 26 )) shouldBe Themes .OKTOBERFEST
81+ pickThemeForDate(LocalDate .of(2026 , Month .SEPTEMBER , 27 )) shouldBe Themes .OKTOBERFEST
82+ pickThemeForDate(LocalDate .of(2026 , Month .SEPTEMBER , 28 )) shouldBe Themes .OKTOBERFEST
83+ pickThemeForDate(LocalDate .of(2026 , Month .SEPTEMBER , 29 )) shouldBe Themes .OKTOBERFEST
84+ pickThemeForDate(LocalDate .of(2026 , Month .SEPTEMBER , 30 )) shouldBe Themes .OKTOBERFEST
85+ pickThemeForDate(LocalDate .of(2026 , Month .OCTOBER , 1 )) shouldBe Themes .OKTOBERFEST
86+ pickThemeForDate(LocalDate .of(2026 , Month .OCTOBER , 2 )) shouldBe Themes .OKTOBERFEST
87+ pickThemeForDate(LocalDate .of(2026 , Month .OCTOBER , 3 )) shouldBe Themes .OKTOBERFEST
88+ pickThemeForDate(LocalDate .of(2026 , Month .OCTOBER , 4 )) shouldBe Themes .OKTOBERFEST
89+ pickThemeForDate(LocalDate .of(2026 , Month .OCTOBER , 5 )) shouldBe null
90+ }
91+
7092 @Test
7193 fun `Should find the right date for easter sunday` () {
7294 findEasterSunday(2027 ) shouldBe LocalDate .of(2027 , Month .MARCH , 28 )
@@ -75,4 +97,19 @@ class ThemeUtilsTest : AbstractTest() {
7597 findEasterSunday(2024 ) shouldBe LocalDate .of(2024 , Month .MARCH , 31 )
7698 findEasterSunday(2023 ) shouldBe LocalDate .of(2023 , Month .APRIL , 9 )
7799 }
100+
101+ @Test
102+ fun `Should find the right dates for Oktoberfest` () {
103+ findOktoberfest(2026 ) shouldBe
104+ (LocalDate .of(2026 , Month .SEPTEMBER , 19 ) to LocalDate .of(2026 , Month .OCTOBER , 4 ))
105+
106+ findOktoberfest(2025 ) shouldBe
107+ (LocalDate .of(2025 , Month .SEPTEMBER , 20 ) to LocalDate .of(2025 , Month .OCTOBER , 5 ))
108+
109+ findOktoberfest(2024 ) shouldBe
110+ (LocalDate .of(2024 , Month .SEPTEMBER , 21 ) to LocalDate .of(2024 , Month .OCTOBER , 6 ))
111+
112+ findOktoberfest(2023 ) shouldBe
113+ (LocalDate .of(2023 , Month .SEPTEMBER , 16 ) to LocalDate .of(2023 , Month .OCTOBER , 3 ))
114+ }
78115}
0 commit comments