Polish
See gh-46505 Signed-off-by: Johnny Lim <izeye@naver.com>
This commit is contained in:
parent
4b6064f4aa
commit
a29308dcbc
|
@ -33,7 +33,7 @@ import org.springframework.util.CollectionUtils;
|
|||
* properties.
|
||||
* <p>
|
||||
* Can be injected into application code and used to define a custom
|
||||
* {@code RabbitTemplateConfigurer} whose configuration is based upon that produced by
|
||||
* {@code RabbitTemplate} whose configuration is based upon that produced by
|
||||
* auto-configuration.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
|
|
|
@ -116,10 +116,10 @@ class CollectionBinderTests {
|
|||
.satisfies((ex) -> {
|
||||
Set<ConfigurationProperty> unbound = ((UnboundConfigurationPropertiesException) ex.getCause())
|
||||
.getUnboundProperties();
|
||||
assertThat(unbound).hasSize(1);
|
||||
ConfigurationProperty property = unbound.iterator().next();
|
||||
assertThat(property.getName()).hasToString("foo[3]");
|
||||
assertThat(property.getValue()).isEqualTo("3");
|
||||
assertThat(unbound).singleElement().satisfies((property) -> {
|
||||
assertThat(property.getName()).hasToString("foo[3]");
|
||||
assertThat(property.getValue()).isEqualTo("3");
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -136,10 +136,10 @@ class CollectionBinderTests {
|
|||
.satisfies((ex) -> {
|
||||
Set<ConfigurationProperty> unbound = ((UnboundConfigurationPropertiesException) ex.getCause())
|
||||
.getUnboundProperties();
|
||||
assertThat(unbound).hasSize(1);
|
||||
ConfigurationProperty property = unbound.iterator().next();
|
||||
assertThat(property.getName()).hasToString("foo[1].missing");
|
||||
assertThat(property.getValue()).isEqualTo("bad");
|
||||
assertThat(unbound).singleElement().satisfies((property) -> {
|
||||
assertThat(property.getName()).hasToString("foo[1].missing");
|
||||
assertThat(property.getValue()).isEqualTo("bad");
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -152,10 +152,10 @@ class CollectionBinderTests {
|
|||
source.put("foo[0].string", "test");
|
||||
this.sources.add(source);
|
||||
List<ExampleCollectionBean> list = this.binder.bind("foo", Bindable.listOf(ExampleCollectionBean.class)).get();
|
||||
assertThat(list).hasSize(1);
|
||||
ExampleCollectionBean bean = list.get(0);
|
||||
assertThat(bean.getItems()).containsExactly("a", "b", "d");
|
||||
assertThat(bean.getString()).isEqualTo("test");
|
||||
assertThat(list).singleElement().satisfies((bean) -> {
|
||||
assertThat(bean.getItems()).containsExactly("a", "b", "d");
|
||||
assertThat(bean.getString()).isEqualTo("test");
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -170,10 +170,10 @@ class CollectionBinderTests {
|
|||
.satisfies((ex) -> {
|
||||
Set<ConfigurationProperty> unbound = ((UnboundConfigurationPropertiesException) ex.getCause())
|
||||
.getUnboundProperties();
|
||||
assertThat(unbound).hasSize(1);
|
||||
ConfigurationProperty property = unbound.iterator().next();
|
||||
assertThat(property.getName()).hasToString("foo[4].value");
|
||||
assertThat(property.getValue()).isEqualTo("4");
|
||||
assertThat(unbound).singleElement().satisfies((property) -> {
|
||||
assertThat(property.getName()).hasToString("foo[4].value");
|
||||
assertThat(property.getValue()).isEqualTo("4");
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue