@@ -458,17 +458,19 @@ public void testDateFormatModifiers() throws IOException {
458458
459459 var now = ZonedDateTime .ofInstant (date .toInstant (), ZoneId .systemDefault ());
460460
461- assertEquals (DateTimeFormatter .ofLocalizedDate (FormatStyle .SHORT ).format (now ) + ",\n "
462- + DateTimeFormatter .ISO_OFFSET_DATE_TIME .format (now ) + ",\n "
463- + DateTimeFormatter .ofLocalizedDate (FormatStyle .SHORT ).format (now ) + ",\n "
464- + DateTimeFormatter .ISO_OFFSET_DATE_TIME .format (now ) + ",\n "
465- + DateTimeFormatter .ofLocalizedDate (FormatStyle .SHORT ).format (now ) + ",\n "
466- + DateTimeFormatter .ISO_OFFSET_DATE_TIME .format (now ) + ",\n "
467- + DateTimeFormatter .ofLocalizedDate (FormatStyle .SHORT ).format (LocalDateTime .of (localDate , LocalTime .MIDNIGHT )) + ",\n "
468- + DateTimeFormatter .ofLocalizedTime (FormatStyle .SHORT ).format (LocalDateTime .of (LocalDate .now (), localTime )) + ",\n "
469- + DateTimeFormatter .ofLocalizedDateTime (FormatStyle .SHORT ).format (localDateTime ) + ",\n "
470- + DateTimeFormatter .ofLocalizedDate (FormatStyle .LONG ).format (zonedLocalDate ) + ",\n "
471- + DateTimeFormatter .ofLocalizedTime (FormatStyle .LONG ).format (zonedLocalTime ) + ",\n "
461+ var lineSeparator = System .lineSeparator ();
462+
463+ assertEquals (DateTimeFormatter .ofLocalizedDate (FormatStyle .SHORT ).format (now ) + "," + lineSeparator
464+ + DateTimeFormatter .ISO_OFFSET_DATE_TIME .format (now ) + "," + lineSeparator
465+ + DateTimeFormatter .ofLocalizedDate (FormatStyle .SHORT ).format (now ) + "," + lineSeparator
466+ + DateTimeFormatter .ISO_OFFSET_DATE_TIME .format (now ) + "," + lineSeparator
467+ + DateTimeFormatter .ofLocalizedDate (FormatStyle .SHORT ).format (now ) + "," + lineSeparator
468+ + DateTimeFormatter .ISO_OFFSET_DATE_TIME .format (now ) + "," + lineSeparator
469+ + DateTimeFormatter .ofLocalizedDate (FormatStyle .SHORT ).format (LocalDateTime .of (localDate , LocalTime .MIDNIGHT )) + "," + lineSeparator
470+ + DateTimeFormatter .ofLocalizedTime (FormatStyle .SHORT ).format (LocalDateTime .of (LocalDate .now (), localTime )) + "," + lineSeparator
471+ + DateTimeFormatter .ofLocalizedDateTime (FormatStyle .SHORT ).format (localDateTime ) + "," + lineSeparator
472+ + DateTimeFormatter .ofLocalizedDate (FormatStyle .LONG ).format (zonedLocalDate ) + "," + lineSeparator
473+ + DateTimeFormatter .ofLocalizedTime (FormatStyle .LONG ).format (zonedLocalTime ) + "," + lineSeparator
472474 + DateTimeFormatter .ofLocalizedDateTime (FormatStyle .LONG ).format (zonedLocalDateTime ), writer .toString ());
473475 }
474476
0 commit comments