@ -63,8 +63,8 @@ class QualifierAnnotationAutowireContextTests {
@@ -63,8 +63,8 @@ class QualifierAnnotationAutowireContextTests {
new RootBeanDefinition ( QualifiedFieldTestBean . class ) ) ;
AnnotationConfigUtils . registerAnnotationConfigProcessors ( context ) ;
assertThatExceptionOfType ( BeanCreationException . class ) . isThrownBy (
context : : refresh )
assertThatExceptionOfType ( BeanCreationException . class )
. isThrownBy ( context : : refresh )
. satisfies ( ex - > {
assertThat ( ex . getRootCause ( ) ) . isInstanceOf ( NoSuchBeanDefinitionException . class ) ;
assertThat ( ex . getBeanName ( ) ) . isEqualTo ( "autowired" ) ;
@ -81,8 +81,9 @@ class QualifierAnnotationAutowireContextTests {
@@ -81,8 +81,9 @@ class QualifierAnnotationAutowireContextTests {
context . registerBeanDefinition ( "autowired" ,
new RootBeanDefinition ( QualifiedMethodParameterTestBean . class ) ) ;
AnnotationConfigUtils . registerAnnotationConfigProcessors ( context ) ;
assertThatExceptionOfType ( BeanCreationException . class ) . isThrownBy (
context : : refresh )
assertThatExceptionOfType ( BeanCreationException . class )
. isThrownBy ( context : : refresh )
. satisfies ( ex - > {
assertThat ( ex . getRootCause ( ) ) . isInstanceOf ( NoSuchBeanDefinitionException . class ) ;
assertThat ( ex . getBeanName ( ) ) . isEqualTo ( "autowired" ) ;
@ -100,8 +101,9 @@ class QualifierAnnotationAutowireContextTests {
@@ -100,8 +101,9 @@ class QualifierAnnotationAutowireContextTests {
context . registerBeanDefinition ( "autowired" ,
new RootBeanDefinition ( QualifiedConstructorArgumentTestBean . class ) ) ;
AnnotationConfigUtils . registerAnnotationConfigProcessors ( context ) ;
assertThatExceptionOfType ( UnsatisfiedDependencyException . class ) . isThrownBy (
context : : refresh )
assertThatExceptionOfType ( UnsatisfiedDependencyException . class )
. isThrownBy ( context : : refresh )
. satisfies ( ex - > assertThat ( ex . getBeanName ( ) ) . isEqualTo ( "autowired" ) ) ;
}
@ -205,8 +207,9 @@ class QualifierAnnotationAutowireContextTests {
@@ -205,8 +207,9 @@ class QualifierAnnotationAutowireContextTests {
context . registerBeanDefinition ( "autowired" ,
new RootBeanDefinition ( QualifiedFieldTestBean . class ) ) ;
AnnotationConfigUtils . registerAnnotationConfigProcessors ( context ) ;
assertThatExceptionOfType ( BeanCreationException . class ) . isThrownBy (
context : : refresh )
assertThatExceptionOfType ( BeanCreationException . class )
. isThrownBy ( context : : refresh )
. satisfies ( ex - > {
assertThat ( ex . getRootCause ( ) ) . isInstanceOf ( NoSuchBeanDefinitionException . class ) ;
assertThat ( ex . getBeanName ( ) ) . isEqualTo ( "autowired" ) ;
@ -227,8 +230,9 @@ class QualifierAnnotationAutowireContextTests {
@@ -227,8 +230,9 @@ class QualifierAnnotationAutowireContextTests {
context . registerBeanDefinition ( "autowired" ,
new RootBeanDefinition ( QualifiedMethodParameterTestBean . class ) ) ;
AnnotationConfigUtils . registerAnnotationConfigProcessors ( context ) ;
assertThatExceptionOfType ( BeanCreationException . class ) . isThrownBy (
context : : refresh )
assertThatExceptionOfType ( BeanCreationException . class )
. isThrownBy ( context : : refresh )
. satisfies ( ex - > {
assertThat ( ex . getRootCause ( ) ) . isInstanceOf ( NoSuchBeanDefinitionException . class ) ;
assertThat ( ex . getBeanName ( ) ) . isEqualTo ( "autowired" ) ;
@ -249,8 +253,9 @@ class QualifierAnnotationAutowireContextTests {
@@ -249,8 +253,9 @@ class QualifierAnnotationAutowireContextTests {
context . registerBeanDefinition ( "autowired" ,
new RootBeanDefinition ( QualifiedConstructorArgumentTestBean . class ) ) ;
AnnotationConfigUtils . registerAnnotationConfigProcessors ( context ) ;
assertThatExceptionOfType ( UnsatisfiedDependencyException . class ) . isThrownBy (
context : : refresh )
assertThatExceptionOfType ( UnsatisfiedDependencyException . class )
. isThrownBy ( context : : refresh )
. satisfies ( ex - > assertThat ( ex . getBeanName ( ) ) . isEqualTo ( "autowired" ) ) ;
}
@ -374,8 +379,9 @@ class QualifierAnnotationAutowireContextTests {
@@ -374,8 +379,9 @@ class QualifierAnnotationAutowireContextTests {
context . registerBeanDefinition ( "autowired" ,
new RootBeanDefinition ( QualifiedFieldWithDefaultValueTestBean . class ) ) ;
AnnotationConfigUtils . registerAnnotationConfigProcessors ( context ) ;
assertThatExceptionOfType ( BeanCreationException . class ) . isThrownBy (
context : : refresh )
assertThatExceptionOfType ( BeanCreationException . class )
. isThrownBy ( context : : refresh )
. satisfies ( ex - > {
assertThat ( ex . getRootCause ( ) ) . isInstanceOf ( NoSuchBeanDefinitionException . class ) ;
assertThat ( ex . getBeanName ( ) ) . isEqualTo ( "autowired" ) ;
@ -451,8 +457,9 @@ class QualifierAnnotationAutowireContextTests {
@@ -451,8 +457,9 @@ class QualifierAnnotationAutowireContextTests {
context . registerBeanDefinition ( "autowired" ,
new RootBeanDefinition ( QualifiedFieldWithMultipleAttributesTestBean . class ) ) ;
AnnotationConfigUtils . registerAnnotationConfigProcessors ( context ) ;
assertThatExceptionOfType ( BeanCreationException . class ) . isThrownBy (
context : : refresh )
assertThatExceptionOfType ( BeanCreationException . class )
. isThrownBy ( context : : refresh )
. satisfies ( ex - > {
assertThat ( ex . getRootCause ( ) ) . isInstanceOf ( NoSuchBeanDefinitionException . class ) ;
assertThat ( ex . getBeanName ( ) ) . isEqualTo ( "autowired" ) ;
@ -507,8 +514,9 @@ class QualifierAnnotationAutowireContextTests {
@@ -507,8 +514,9 @@ class QualifierAnnotationAutowireContextTests {
context . registerBeanDefinition ( "autowired" ,
new RootBeanDefinition ( QualifiedFieldWithMultipleAttributesTestBean . class ) ) ;
AnnotationConfigUtils . registerAnnotationConfigProcessors ( context ) ;
assertThatExceptionOfType ( BeanCreationException . class ) . isThrownBy (
context : : refresh )
assertThatExceptionOfType ( BeanCreationException . class )
. isThrownBy ( context : : refresh )
. satisfies ( ex - > {
assertThat ( ex . getRootCause ( ) ) . isInstanceOf ( NoSuchBeanDefinitionException . class ) ;
assertThat ( ex . getBeanName ( ) ) . isEqualTo ( "autowired" ) ;
@ -574,8 +582,9 @@ class QualifierAnnotationAutowireContextTests {
@@ -574,8 +582,9 @@ class QualifierAnnotationAutowireContextTests {
context . registerBeanDefinition ( "autowired" ,
new RootBeanDefinition ( QualifiedConstructorArgumentWithBaseQualifierNonDefaultValueTestBean . class ) ) ;
AnnotationConfigUtils . registerAnnotationConfigProcessors ( context ) ;
assertThatExceptionOfType ( UnsatisfiedDependencyException . class ) . isThrownBy (
context : : refresh )
assertThatExceptionOfType ( UnsatisfiedDependencyException . class )
. isThrownBy ( context : : refresh )
. satisfies ( ex - > assertThat ( ex . getBeanName ( ) ) . isEqualTo ( "autowired" ) ) ;
}
@ -752,7 +761,7 @@ class QualifierAnnotationAutowireContextTests {
@@ -752,7 +761,7 @@ class QualifierAnnotationAutowireContextTests {
@Qualifier
@interface TestQualifierWithMultipleAttributes {
String value ( ) default "default" ;
String [ ] value ( ) default "default" ;
int number ( ) ;
}