Search in sources :

Example 1 with AmbiguousPojo

use of org.apache.aries.blueprint.pojos.AmbiguousPojo in project aries by apache.

the class WiringTest method testSetterDisambiguation.

public void testSetterDisambiguation() throws Exception {
    ComponentDefinitionRegistryImpl registry = parse("/test-wiring.xml");
    Repository repository = new TestBlueprintContainer(registry).getRepository();
    AmbiguousPojo pojo = (AmbiguousPojo) repository.create("ambiguousViaInt");
    assertEquals(5, pojo.getSum());
    pojo = (AmbiguousPojo) repository.create("ambiguousViaList");
    assertEquals(7, pojo.getSum());
}
Also used : Repository(org.apache.aries.blueprint.di.Repository) BlueprintRepository(org.apache.aries.blueprint.container.BlueprintRepository) AmbiguousPojo(org.apache.aries.blueprint.pojos.AmbiguousPojo) ComponentDefinitionRegistryImpl(org.apache.aries.blueprint.parser.ComponentDefinitionRegistryImpl)

Aggregations

BlueprintRepository (org.apache.aries.blueprint.container.BlueprintRepository)1 Repository (org.apache.aries.blueprint.di.Repository)1 ComponentDefinitionRegistryImpl (org.apache.aries.blueprint.parser.ComponentDefinitionRegistryImpl)1 AmbiguousPojo (org.apache.aries.blueprint.pojos.AmbiguousPojo)1