Skip to content

Commit

Permalink
Ignored test removed (not intended to work)
Browse files Browse the repository at this point in the history
Issue: SPR-14058
  • Loading branch information
jhoeller committed Mar 23, 2016
1 parent e079a72 commit 3c18a45
Showing 1 changed file with 1 addition and 49 deletions.
Expand Up @@ -54,6 +54,7 @@ public class QualifierAnnotationAutowireContextTests {

private static final String SAM = "sam";


@Test
public void autowiredFieldWithSingleNonQualifiedCandidate() {
GenericApplicationContext context = new GenericApplicationContext();
Expand Down Expand Up @@ -312,24 +313,6 @@ public void autowiredFieldResolvesMetaQualifiedCandidate() {
assertEquals(JUERGEN, bean.getPerson().getName());
}

/**
* @see SpringBean
*/
@Test
@Ignore("Disabled until SPR-14058 is resolved")
public void autowiredFieldResolutionIgnoresEmptyQualifierFromComposedQualifierAnnotation() {
GenericApplicationContext context = new GenericApplicationContext();
ConstructorArgumentValues cavs1 = new ConstructorArgumentValues();
cavs1.addGenericArgumentValue(SAM);
RootBeanDefinition person1 = new RootBeanDefinition(Person.class, cavs1, null);
context.registerBeanDefinition(SAM, person1);
context.registerBeanDefinition("autowired", new RootBeanDefinition(ComposedAnnotationQualifiedFieldTestBean.class));
AnnotationConfigUtils.registerAnnotationConfigProcessors(context);
context.refresh();
ComposedAnnotationQualifiedFieldTestBean bean = context.getBean(ComposedAnnotationQualifiedFieldTestBean.class);
assertEquals(SAM, bean.getPerson().getName());
}

@Test
public void autowiredMethodParameterResolvesQualifiedCandidate() {
GenericApplicationContext context = new GenericApplicationContext();
Expand Down Expand Up @@ -657,37 +640,6 @@ public Person getPerson() {
}


/**
* {@code @SpringBean} is a composed annotation that combines the semantics of
* {@code Autowired @Autowired} and {@code Qualifier @Qualifier}
*/
@Autowired
@Qualifier
@Retention(RetentionPolicy.RUNTIME)
public @interface SpringBean {

@AliasFor(annotation = Qualifier.class)
String value() default "";

@AliasFor(annotation = Qualifier.class, attribute = "value")
String qualifier() default "";

@AliasFor(annotation = Autowired.class)
boolean required() default true;

}

private static class ComposedAnnotationQualifiedFieldTestBean {

@SpringBean
private Person person;

public Person getPerson() {
return this.person;
}
}


private static class QualifiedMethodParameterTestBean {

private Person person;
Expand Down

0 comments on commit 3c18a45

Please sign in to comment.