Package org.apache.felix.ipojo

Examples of org.apache.felix.ipojo.ComponentFactory.start()


    fact1.start();
    assertTrue("Check instance validity - 4", under.getState() == ComponentInstance.VALID);
   
    under.dispose();
    fact2.start();
    fact3.start();
  }
 
  public void testFactoryManagementLevel2() {
    ServiceContext sc = Utils.getServiceContext(empty);
    Properties props = new Properties();
View Full Code Here


    fact1.start();
    assertTrue("Check instance validity - 4", under.getState() == ComponentInstance.VALID);
   
    under.dispose();
    fact2.start();
    fact3.start();
  }
 
  public void testArchitecture() {
    Properties props = new Properties();
    props.put("instance.name","under");
View Full Code Here

    assertEquals("Check instance name" , id.getName(), "under");
    assertEquals("Check component type name" , id.getComponentDescription().getName(), "composite.bar.1");

    under.dispose();
    fact2.start();
    fact3.start();
  }

}
View Full Code Here

        assertTrue("Check foo1 invalidity (" + ci1.getState() + ")", ci1.getState() == ComponentInstance.DISPOSED);
        assertTrue("Check foo2 invalidity (" + ci1.getState() + ")", ci2.getState() == ComponentInstance.DISPOSED);

        assertNull("Check no foo service", osgiHelper.getServiceReference(FooService.class.getName()));

        factory.start();
        assertNull("Check no foo service", osgiHelper.getServiceReference(FooService.class.getName()));
    }

    @Test
    public void testDisposeAfterFactoryInvalidation() {
View Full Code Here

    @Test
    public void testNoField() {
        try {
            ComponentFactory cf = new ComponentFactory(osgiHelper.getContext(), getNoFieldController());
            cf.start();
            cf.stop();
            fail("A lifecycle controller with a missing field must be rejected " + cf);
        } catch (Exception e) {
            // OK
        }
View Full Code Here

    @Test
    public void testBadField() {
        try {
            ComponentFactory cf = new ComponentFactory(osgiHelper.getContext(), getBadFieldController());
            cf.start();
            cf.stop();
            fail("A lifecycle controller with a bad field must be rejected " + cf);
        } catch (Exception e) {
            // OK
        }
View Full Code Here

                BarService.class.getName(), null).length, 1);
        assertTrue("Check instance validity - 5", under.getState() == ComponentInstance.VALID);

        under.dispose();
        fact2.start();
        fact3.start();
    }

    @Test
    public void testFactoryManagementLevel2() {
        ServiceContext sc = getServiceContext(empty);
View Full Code Here

        assertEquals("Check service provider number", ipojoHelper.getServiceReferences(sc2,
                BarService.class.getName(), null).length, 1);

        under.dispose();
        fact2.start();
        fact3.start();
    }

}
View Full Code Here

    fact1.start();
    assertTrue("Check instance validity - 5", under.getState() == ComponentInstance.VALID);
   
    under.dispose();
    fact2.start();
    fact3.start();
  }
 
  @Test public void testFactoryManagementLevel2() {
    ServiceContext sc = getServiceContext(empty);
    Properties props = new Properties();
View Full Code Here

    fact1.start();
    assertTrue("Check instance validity - 5", under.getState() == ComponentInstance.VALID);
   
    under.dispose();
    fact2.start();
    fact3.start();
  }
 
  @Test public void testArchitecture() {
    Properties props = new Properties();
    props.put("instance.name","under");
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.