Commit f96a688c authored by Andy Wilkinson's avatar Andy Wilkinson

Polish "Allow DurationFormat and PeriodFormat to be used on parameters"

See gh-22646
parent 914452b2
......@@ -833,9 +833,8 @@ class ConfigurationPropertiesTests {
source.put("test.duration", "P12D");
sources.addLast(new MapPropertySource("test", source));
assertThatExceptionOfType(Exception.class)
.isThrownBy(() -> load(ConstructorParameterWithFormatConfiguration.class)).satisfies((ex) -> {
assertThat(ex).hasCauseInstanceOf(BindException.class);
});
.isThrownBy(() -> load(ConstructorParameterWithFormatConfiguration.class)).havingCause()
.isInstanceOf(BindException.class);
}
@Test
......@@ -845,9 +844,8 @@ class ConfigurationPropertiesTests {
source.put("test.period", "P12D");
sources.addLast(new MapPropertySource("test", source));
assertThatExceptionOfType(Exception.class)
.isThrownBy(() -> load(ConstructorParameterWithFormatConfiguration.class)).satisfies((ex) -> {
assertThat(ex).hasCauseInstanceOf(BindException.class);
});
.isThrownBy(() -> load(ConstructorParameterWithFormatConfiguration.class)).havingCause()
.isInstanceOf(BindException.class);
}
@Test
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment