Polish formatting
This commit is contained in:
@@ -297,9 +297,8 @@ public class DataSourceInitializerTests {
|
||||
PropertyPlaceholderAutoConfiguration.class);
|
||||
EnvironmentTestUtils.addEnvironment(this.context,
|
||||
"spring.datasource.initialize:true",
|
||||
"spring.datasource.schema:"
|
||||
+ ClassUtils.addResourcePathToPackagePath(getClass(),
|
||||
"schema.sql"),
|
||||
"spring.datasource.schema:" + ClassUtils
|
||||
.addResourcePathToPackagePath(getClass(), "schema.sql"),
|
||||
"spring.datasource.data:classpath:does/not/exist.sql");
|
||||
|
||||
this.thrown.expect(BeanCreationException.class);
|
||||
|
||||
@@ -67,14 +67,15 @@ public class ValidationAutoConfigurationTests {
|
||||
public void userDefinedMethodValidationPostProcessorTakesPrecedence() {
|
||||
load(SampleConfiguration.class);
|
||||
assertThat(this.context.getBeansOfType(Validator.class)).hasSize(1);
|
||||
Object userMethodValidationPostProcessor =
|
||||
this.context.getBean("testMethodValidationPostProcessor");
|
||||
Object userMethodValidationPostProcessor = this.context
|
||||
.getBean("testMethodValidationPostProcessor");
|
||||
assertThat(this.context.getBean(MethodValidationPostProcessor.class))
|
||||
.isSameAs(userMethodValidationPostProcessor);
|
||||
assertThat(this.context.getBeansOfType(MethodValidationPostProcessor.class))
|
||||
.hasSize(1);
|
||||
assertThat(this.context.getBean(Validator.class)).isNotSameAs(
|
||||
new DirectFieldAccessor(userMethodValidationPostProcessor).getPropertyValue("validator"));
|
||||
assertThat(this.context.getBean(Validator.class))
|
||||
.isNotSameAs(new DirectFieldAccessor(userMethodValidationPostProcessor)
|
||||
.getPropertyValue("validator"));
|
||||
}
|
||||
|
||||
public void load(Class<?> config) {
|
||||
|
||||
Reference in New Issue
Block a user