|
|
@ -833,9 +833,8 @@ class ConfigurationPropertiesTests {
|
|
|
|
source.put("test.duration", "P12D");
|
|
|
|
source.put("test.duration", "P12D");
|
|
|
|
sources.addLast(new MapPropertySource("test", source));
|
|
|
|
sources.addLast(new MapPropertySource("test", source));
|
|
|
|
assertThatExceptionOfType(Exception.class)
|
|
|
|
assertThatExceptionOfType(Exception.class)
|
|
|
|
.isThrownBy(() -> load(ConstructorParameterWithFormatConfiguration.class)).satisfies((ex) -> {
|
|
|
|
.isThrownBy(() -> load(ConstructorParameterWithFormatConfiguration.class)).havingCause()
|
|
|
|
assertThat(ex).hasCauseInstanceOf(BindException.class);
|
|
|
|
.isInstanceOf(BindException.class);
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
@ -845,9 +844,8 @@ class ConfigurationPropertiesTests {
|
|
|
|
source.put("test.period", "P12D");
|
|
|
|
source.put("test.period", "P12D");
|
|
|
|
sources.addLast(new MapPropertySource("test", source));
|
|
|
|
sources.addLast(new MapPropertySource("test", source));
|
|
|
|
assertThatExceptionOfType(Exception.class)
|
|
|
|
assertThatExceptionOfType(Exception.class)
|
|
|
|
.isThrownBy(() -> load(ConstructorParameterWithFormatConfiguration.class)).satisfies((ex) -> {
|
|
|
|
.isThrownBy(() -> load(ConstructorParameterWithFormatConfiguration.class)).havingCause()
|
|
|
|
assertThat(ex).hasCauseInstanceOf(BindException.class);
|
|
|
|
.isInstanceOf(BindException.class);
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|