Polish formatting

This commit is contained in:
Phillip Webb
2016-12-19 12:37:54 -08:00
parent 4b9cba351b
commit 6121208cbb
46 changed files with 110 additions and 88 deletions

View File

@@ -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);

View File

@@ -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) {