Skip to content

Commit 0ca47e5

Browse files
committed
Polishing
1 parent 33d3496 commit 0ca47e5

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

Diff for: spring-context/src/test/java/org/springframework/format/datetime/standard/DateTimeFormattingTests.java

+6-16
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,7 @@ void testBindLocalDateTime() {
274274
binder.bind(propertyValues);
275275
assertThat(binder.getBindingResult().getErrorCount()).isZero();
276276
String value = binder.getBindingResult().getFieldValue("localDateTime").toString();
277-
assertThat(value)
278-
.startsWith("10/31/09")
279-
.endsWith("12:00 PM");
277+
assertThat(value).startsWith("10/31/09").endsWith("12:00 PM");
280278
}
281279

282280
@Test
@@ -286,9 +284,7 @@ void testBindLocalDateTimeWithISO() {
286284
binder.bind(propertyValues);
287285
assertThat(binder.getBindingResult().getErrorCount()).isZero();
288286
String value = binder.getBindingResult().getFieldValue("localDateTime").toString();
289-
assertThat(value)
290-
.startsWith("10/31/09")
291-
.endsWith("12:00 PM");
287+
assertThat(value).startsWith("10/31/09").endsWith("12:00 PM");
292288
}
293289

294290
@Test
@@ -298,9 +294,7 @@ void testBindLocalDateTimeAnnotated() {
298294
binder.bind(propertyValues);
299295
assertThat(binder.getBindingResult().getErrorCount()).isZero();
300296
String value = binder.getBindingResult().getFieldValue("styleLocalDateTime").toString();
301-
assertThat(value)
302-
.startsWith("Oct 31, 2009")
303-
.endsWith("12:00:00 PM");
297+
assertThat(value).startsWith("Oct 31, 2009").endsWith("12:00:00 PM");
304298
}
305299

306300
@Test
@@ -310,9 +304,7 @@ void testBindLocalDateTimeFromJavaUtilCalendar() {
310304
binder.bind(propertyValues);
311305
assertThat(binder.getBindingResult().getErrorCount()).isZero();
312306
String value = binder.getBindingResult().getFieldValue("localDateTime").toString();
313-
assertThat(value)
314-
.startsWith("10/31/09")
315-
.endsWith("12:00 PM");
307+
assertThat(value).startsWith("10/31/09").endsWith("12:00 PM");
316308
}
317309

318310
@Test
@@ -325,9 +317,7 @@ void testBindDateTimeWithSpecificStyle() {
325317
binder.bind(propertyValues);
326318
assertThat(binder.getBindingResult().getErrorCount()).isZero();
327319
String value = binder.getBindingResult().getFieldValue("localDateTime").toString();
328-
assertThat(value)
329-
.startsWith("Oct 31, 2009")
330-
.endsWith("12:00:00 PM");
320+
assertThat(value).startsWith("Oct 31, 2009").endsWith("12:00:00 PM");
331321
}
332322

333323
@Test
@@ -540,6 +530,7 @@ void testBindMonthDayAnnotatedPattern() {
540530
assertThat(binder.getBindingResult().getRawFieldValue("monthDayAnnotatedPattern")).isEqualTo(MonthDay.parse("--01-03"));
541531
}
542532

533+
543534
@Nested
544535
class FallbackPatternTests {
545536

@@ -690,7 +681,6 @@ public static class DateTimeBean {
690681

691682
private final List<DateTimeBean> children = new ArrayList<>();
692683

693-
694684
public LocalDate getLocalDate() {
695685
return this.localDate;
696686
}

0 commit comments

Comments
 (0)