Commit 1fa83757 authored by Madhura Bhave's avatar Madhura Bhave

Fix tests

See gh-19599
parent 13999546
...@@ -122,7 +122,7 @@ class ValidationBindHandlerTests { ...@@ -122,7 +122,7 @@ class ValidationBindHandlerTests {
this.sources.add(new MockConfigurationPropertySource("foo.nested.age", "4")); this.sources.add(new MockConfigurationPropertySource("foo.nested.age", "4"));
BindValidationException cause = bindAndExpectValidationError(() -> this.binder.bind( BindValidationException cause = bindAndExpectValidationError(() -> this.binder.bind(
ConfigurationPropertyName.of("foo"), Bindable.of(ExampleValidatedWithNestedBean.class), this.handler)); ConfigurationPropertyName.of("foo"), Bindable.of(ExampleValidatedWithNestedBean.class), this.handler));
assertThat(cause.getValidationErrors().getName().toString()).isEqualTo("foo"); assertThat(cause.getValidationErrors().getName().toString()).isEqualTo("foo.nested");
assertThat(cause.getMessage()).contains("nested.age"); assertThat(cause.getMessage()).contains("nested.age");
assertThat(cause.getMessage()).contains("rejected value [4]"); assertThat(cause.getMessage()).contains("rejected value [4]");
} }
......
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