Package org.apache.aries.blueprint.di

Examples of org.apache.aries.blueprint.di.Repository.create()


      // support cascaded injection 'bean.name' via fields
      assertEquals("aName", bean.getBeanName());
     
      // fail if field-injection is not specified
      try {
          repository.create("FIFailureTestBean");
          Assert.fail("Expected exception");
      } catch (ComponentDefinitionException cde) {}
     
      // fail if field-injection is false
      try {
View Full Code Here


          Assert.fail("Expected exception");
      } catch (ComponentDefinitionException cde) {}
     
      // fail if field-injection is false
      try {
          repository.create("FIFailureTest2Bean");
          Assert.fail("Expected exception");
      } catch (ComponentDefinitionException cde) {}
    }
   
    public void testCompoundProperties() throws Exception {
View Full Code Here

   
    public void testCompoundProperties() throws Exception {
        ComponentDefinitionRegistryImpl registry = parse("/test-wiring.xml");
        Repository repository = new TestBlueprintContainer(registry).getRepository();
       
        Object obj5 = repository.create("compound");
        assertNotNull(obj5);
        assertTrue(obj5 instanceof PojoB);
        PojoB pojob = (PojoB) obj5;
   
        assertEquals("hello bean property", pojob.getBean().getName());
View Full Code Here

        assertTrue(obj5 instanceof PojoB);
        PojoB pojob = (PojoB) obj5;
   
        assertEquals("hello bean property", pojob.getBean().getName());

        Object obj = repository.create("goodIdRef");
        assertNotNull(obj);
        assertTrue(obj instanceof BeanD);
        BeanD bean = (BeanD) obj;

        assertEquals("pojoA", bean.getName());
View Full Code Here

   
    public void testConstructor() throws Exception {
        ComponentDefinitionRegistryImpl registry = parse("/test-constructor.xml");
        Repository repository = new TestBlueprintContainer(registry).getRepository();

        Object obj1 = repository.create("pojoA");
        assertNotNull(obj1);
        assertTrue(obj1 instanceof PojoA);
        PojoA pojoa = (PojoA) obj1;
       
        Object obj2 = repository.create("pojoB");
View Full Code Here

        Object obj1 = repository.create("pojoA");
        assertNotNull(obj1);
        assertTrue(obj1 instanceof PojoA);
        PojoA pojoa = (PojoA) obj1;
       
        Object obj2 = repository.create("pojoB");
        testPojoB(obj2, URI.create("urn:myuri"), 10);
       
        assertEquals(obj2, pojoa.getPojob());
        assertEquals(new BigInteger("10"), pojoa.getNumber());
       
View Full Code Here

        testPojoB(obj2, URI.create("urn:myuri"), 10);
       
        assertEquals(obj2, pojoa.getPojob());
        assertEquals(new BigInteger("10"), pojoa.getNumber());
       
        Object obj3 = repository.create("pojoC");
        testPojoB(obj3, URI.create("urn:myuri-static"), 15);
       
        Object obj4 = repository.create("pojoD");
        testPojoB(obj4, URI.create("urn:myuri-static"), 15);
       
View Full Code Here

        assertEquals(new BigInteger("10"), pojoa.getNumber());
       
        Object obj3 = repository.create("pojoC");
        testPojoB(obj3, URI.create("urn:myuri-static"), 15);
       
        Object obj4 = repository.create("pojoD");
        testPojoB(obj4, URI.create("urn:myuri-static"), 15);
       
        Object obj5 = repository.create("pojoE");
        testPojoB(obj5, URI.create("urn:myuri-dynamic"), 20);
       
View Full Code Here

        testPojoB(obj3, URI.create("urn:myuri-static"), 15);
       
        Object obj4 = repository.create("pojoD");
        testPojoB(obj4, URI.create("urn:myuri-static"), 15);
       
        Object obj5 = repository.create("pojoE");
        testPojoB(obj5, URI.create("urn:myuri-dynamic"), 20);
       
        Object obj6 = repository.create("multipleInt");
        testMultiple(obj6, null, 123, null);
       
View Full Code Here

        testPojoB(obj4, URI.create("urn:myuri-static"), 15);
       
        Object obj5 = repository.create("pojoE");
        testPojoB(obj5, URI.create("urn:myuri-dynamic"), 20);
       
        Object obj6 = repository.create("multipleInt");
        testMultiple(obj6, null, 123, null);
       
        Object obj7 = repository.create("multipleInteger");
        testMultiple(obj7, null, -1, new Integer(123));
       
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.