Search in sources :

Example 1 with AutowiredQualifierFooService

use of example.scannable.AutowiredQualifierFooService in project spring-framework by spring-projects.

the class ComponentScanParserTests method componentScanWithAutowiredQualifier.

@Test
public void componentScanWithAutowiredQualifier() {
    ClassPathXmlApplicationContext context = loadContext("componentScanWithAutowiredQualifierTests.xml");
    AutowiredQualifierFooService fooService = (AutowiredQualifierFooService) context.getBean("fooService");
    assertTrue(fooService.isInitCalled());
    assertEquals("bar", fooService.foo(123));
    context.close();
}
Also used : AutowiredQualifierFooService(example.scannable.AutowiredQualifierFooService) ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext) Test(org.junit.Test)

Aggregations

AutowiredQualifierFooService (example.scannable.AutowiredQualifierFooService)1 Test (org.junit.Test)1 ClassPathXmlApplicationContext (org.springframework.context.support.ClassPathXmlApplicationContext)1