Package org.apache.felix.ipojo.test.scenarios.component.inner

Examples of org.apache.felix.ipojo.test.scenarios.component.inner.C3


    assertEquals(ComponentInstance.VALID, instancec1.getState());
    assertEquals(ComponentInstance.VALID, instancec2.getState());
    assertEquals(ComponentInstance.VALID, instancec3.getState());

    // Call C3
    C3 svc = (C3) getServiceObject(C3, null);
    assertNotNull(svc);
    assertEquals("called", svc.getFilter().authenticate());

    // So far, all right

    //We stop c1 and c2.
    instancec1.stop();
    instancec2.stop();

    assertEquals(ComponentInstance.INVALID, instancec3.getState()); // C2 dependency invalid

    instancec1.start();
    instancec2.start();

    // Check that everything is OK
    assertEquals(ComponentInstance.VALID, instancec1.getState());
    assertEquals(ComponentInstance.VALID, instancec2.getState());
    assertEquals(ComponentInstance.VALID, instancec3.getState());

    // Call C3
    svc = (C3) getServiceObject(C3, null);
    assertNotNull(svc);
    assertEquals("called", svc.getFilter().authenticate());
  }
View Full Code Here

TOP

Related Classes of org.apache.felix.ipojo.test.scenarios.component.inner.C3

Copyright © 2018 www.massapicom. 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.