pull/9065/head
Phillip Webb 8 years ago
parent df05aa4701
commit 4db4c81b9b

@ -121,8 +121,8 @@ public class ValidationAutoConfigurationTests {
String[] springValidatorNames = this.context String[] springValidatorNames = this.context
.getBeanNamesForType(org.springframework.validation.Validator.class); .getBeanNamesForType(org.springframework.validation.Validator.class);
assertThat(jsrValidatorNames).containsExactly("defaultValidator"); assertThat(jsrValidatorNames).containsExactly("defaultValidator");
assertThat(springValidatorNames).containsExactly( assertThat(springValidatorNames).containsExactly("customValidator",
"customValidator", "anotherCustomValidator", "defaultValidator"); "anotherCustomValidator", "defaultValidator");
Validator jsrValidator = this.context.getBean(Validator.class); Validator jsrValidator = this.context.getBean(Validator.class);
org.springframework.validation.Validator springValidator = this.context org.springframework.validation.Validator springValidator = this.context
.getBean(org.springframework.validation.Validator.class); .getBean(org.springframework.validation.Validator.class);
@ -138,14 +138,14 @@ public class ValidationAutoConfigurationTests {
String[] springValidatorNames = this.context String[] springValidatorNames = this.context
.getBeanNamesForType(org.springframework.validation.Validator.class); .getBeanNamesForType(org.springframework.validation.Validator.class);
assertThat(jsrValidatorNames).containsExactly("defaultValidator"); assertThat(jsrValidatorNames).containsExactly("defaultValidator");
assertThat(springValidatorNames).containsExactly( assertThat(springValidatorNames).containsExactly("customValidator",
"customValidator", "anotherCustomValidator", "defaultValidator"); "anotherCustomValidator", "defaultValidator");
Validator jsrValidator = this.context.getBean(Validator.class); Validator jsrValidator = this.context.getBean(Validator.class);
org.springframework.validation.Validator springValidator = this.context org.springframework.validation.Validator springValidator = this.context
.getBean(org.springframework.validation.Validator.class); .getBean(org.springframework.validation.Validator.class);
assertThat(jsrValidator).isInstanceOf(LocalValidatorFactoryBean.class); assertThat(jsrValidator).isInstanceOf(LocalValidatorFactoryBean.class);
assertThat(springValidator).isEqualTo( assertThat(springValidator)
this.context.getBean("anotherCustomValidator")); .isEqualTo(this.context.getBean("anotherCustomValidator"));
assertThat(isPrimaryBean("defaultValidator")).isFalse(); assertThat(isPrimaryBean("defaultValidator")).isFalse();
} }

Loading…
Cancel
Save