Skip to content

Commit 114d270

Browse files
committed
Use date that fails with the fallback formatter
Fixes gh-9975
1 parent d1cf308 commit 114d270

File tree

1 file changed

+3
-3
lines changed
  • spring-boot/src/test/java/org/springframework/boot/context/properties/bind

1 file changed

+3
-3
lines changed

spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BinderTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,15 +199,15 @@ public void bindToJavaBeanShouldTriggerOnSuccess() throws Exception {
199199
@Test
200200
public void bindWhenHasMalformedDateShouldThrowException() throws Exception {
201201
this.thrown.expectCause(instanceOf(ConversionFailedException.class));
202-
this.sources.add(new MockConfigurationPropertySource("foo", "2014-04-01"));
202+
this.sources.add(new MockConfigurationPropertySource("foo", "2014-04-01T01:30:00.000-05:00"));
203203
this.binder.bind("foo", Bindable.of(LocalDate.class));
204204
}
205205

206206
@Test
207207
public void bindWhenHasAnnotationsShouldChangeConvertedValue() throws Exception {
208-
this.sources.add(new MockConfigurationPropertySource("foo", "2014-04-01"));
208+
this.sources.add(new MockConfigurationPropertySource("foo", "2014-04-01T01:30:00.000-05:00"));
209209
DateTimeFormat annotation = AnnotationUtils.synthesizeAnnotation(
210-
Collections.singletonMap("iso", DateTimeFormat.ISO.DATE),
210+
Collections.singletonMap("iso", DateTimeFormat.ISO.DATE_TIME),
211211
DateTimeFormat.class, null);
212212
LocalDate result = this.binder
213213
.bind("foo", Bindable.of(LocalDate.class).withAnnotations(annotation))

0 commit comments

Comments
 (0)