Skip to content

Commit

Permalink
Rename CalendarHierarchyTest to SubdivisionsTest
Browse files Browse the repository at this point in the history
  • Loading branch information
derTobsch committed Jan 4, 2025
1 parent e2ba34b commit bf34c98
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.vitorsvieira.iso.ISOCountry;
import com.vitorsvieira.iso.ISOCountrySubdivision;
import de.focus_shift.jollyday.core.HolidayCalendar;
import de.focus_shift.jollyday.core.HolidayManager;
import org.junit.jupiter.api.Test;
import scala.collection.JavaConverters;

Expand All @@ -17,7 +16,7 @@
import static java.util.stream.Collectors.toList;
import static org.assertj.core.api.Assertions.assertThat;

class CalendarHierarchyTest {
class SubdivisionsTest {

private static final List<String> noneIso3166Countries = List.of("DJ_STOXX", "LME", "NYSE", "NYSE_EURONEXT", "TARGET", "XK", "FR", "MC");
private static final List<String> okSubdivisions = List.of("FI-01", "ES-RI", "IN-DH", "IN-OD", "IN-UK", "IN-CG", "IN-LA", "IN-TS", "SM-03", "SM-04", "SM-05", "SM-06", "SM-08");
Expand All @@ -34,8 +33,8 @@ void ensureThatAllCountryAreISO3166Conform() {
.map(CountrySubdivision.EnumVal::toString)
.collect(toList());

final HolidayManager holidayManager = getInstance(create(holidayCalendar));
holidayManager.getCalendarHierarchy().getChildren().keySet()
getInstance(create(holidayCalendar))
.getCalendarHierarchy().getChildren().keySet()
.forEach(subdivision -> {
final String subdivisionWithCountry = holidayCalendar.getId() + "-" + subdivision.toUpperCase();
if (!okSubdivisions.contains(subdivisionWithCountry)) {
Expand Down

0 comments on commit bf34c98

Please sign in to comment.