Skip to content

Commit

Permalink
Commit 2
Browse files Browse the repository at this point in the history
  • Loading branch information
dotasek committed Feb 5, 2025
1 parent 61d5a25 commit 8b9c7e1
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,25 @@ private static Stream<Arguments> getToHumanDisplayLocalTimezoneParams() {
);
}

private static final Locale defaultLocale = Locale.getDefault();
private static Locale defaultLocale;

@BeforeAll
public static void beforeAll() {
ourLog.info("default locale: " + defaultLocale);
ourLog.info("DateTime format: " + FastDateFormat.getDateTimeInstance(FastDateFormat.MEDIUM, FastDateFormat.MEDIUM));
defaultLocale = Locale.getDefault();
ourLog.info("Test setup: getting current default locale");
ourLog.info("Locale.getDefault(): " + defaultLocale);
ourLog.info("Test setup: setting default locale to UK for tests");
Locale.setDefault(Locale.UK);
ourLog.info("default locale: " + defaultLocale);
ourLog.info("Locale.getDefault(): " + Locale.getDefault());
ourLog.info("DateTime format: " + FastDateFormat.getDateTimeInstance(FastDateFormat.MEDIUM, FastDateFormat.MEDIUM));

}

@AfterAll
public static void afterAll() {
ourLog.info("Test teardown: setting default locale back to default");
Locale.setDefault(defaultLocale);
ourLog.info("Locale.getDefault(): " + Locale.getDefault());
ourLog.info("DateTime format: " + FastDateFormat.getDateTimeInstance(FastDateFormat.MEDIUM, FastDateFormat.MEDIUM));
}

@ParameterizedTest
Expand Down

0 comments on commit 8b9c7e1

Please sign in to comment.