Examples of foo()


Examples of org.apache.felix.ipojo.test.composite.service.FooService.foo()

    ServiceContext sc = Utils.getServiceContext(import4);
    ServiceReference[] refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
    assertNotNull("Test foo availability inside the composite - 1", refs);
    assertEquals("Test foo availability inside the composite - 1.2", refs.length, 2);
    FooService fs = (FooService) sc.getService(refs[0]);
    assertTrue("Test foo invocation", fs.foo());
    sc.ungetService(refs[0]);
    fs = (FooService) sc.getService(refs[1]);
    assertTrue("Test foo invocation (2)", fs.foo());
    sc.ungetService(refs[1]);
   
View Full Code Here

Examples of org.apache.felix.ipojo.test.composite.service.FooService.foo()

    assertEquals("Test foo availability inside the composite - 1.2", refs.length, 2);
    FooService fs = (FooService) sc.getService(refs[0]);
    assertTrue("Test foo invocation", fs.foo());
    sc.ungetService(refs[0]);
    fs = (FooService) sc.getService(refs[1]);
    assertTrue("Test foo invocation (2)", fs.foo());
    sc.ungetService(refs[1]);
   
    foo1.stop();
    assertTrue("Test component validity", import4.getState() == ComponentInstance.VALID);
    sc = Utils.getServiceContext(import4);
View Full Code Here

Examples of org.apache.felix.ipojo.test.scenarios.configuration.service.FooService.foo()

    assertEquals("updated count ", 1, updated.intValue());
    assertEquals("Last updated", 5, dict.size());

    // change the field value
    assertTrue("Invoke the fs service", fs.foo());
    toCheck = fs.fooProps();


    //  Re-check the property (change)
    intProp = (Integer) toCheck.get("intProp");
View Full Code Here

Examples of org.apache.felix.ipojo.test.scenarios.manipulation.service.FooService.foo()

    public void testLazyCreation() {
        assertEquals("Check that no objects are created ", 0, ((PrimitiveInstanceDescription) lazzyArch.getInstanceDescription()).getCreatedObjects().length);
        ServiceReference ref = helper.getServiceReferenceByName(FooService.class.getName(), ci_lazzy.getInstanceName());
        assertNotNull("Check that a FooService from " + ci_lazzy.getInstanceName() + " is available",ref);
        FooService fs = (FooService) getServiceObject(ref);
        assertTrue("Check the FooService invocation", fs.foo());
        assertEquals("Check the creation of 1 object",1((PrimitiveInstanceDescription) lazzyArch.getInstanceDescription()).getCreatedObjects().length);
    }

    /**
     * Check lazy and singleton creation.
View Full Code Here

Examples of org.apache.felix.ipojo.test.scenarios.ps.service.FooService.foo()

        assertEquals("my.pid", ref.getProperty(Constants.SERVICE_PID));
       
       
        // Test foo invocation
        FooService fs = (FooService) getServiceObject(ref);
        assertTrue("FooService invocation failed", fs.foo());
       
        helper.dispose();

       
        // Check that there is no more FooService
View Full Code Here

Examples of org.apache.felix.ipojo.test.scenarios.service.dependency.service.FooService.foo()

       
       
        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), fooProvider.getInstanceName());
        FooService fs = (FooService) getContext().getService(ref);
       
        fs.foo(); // Update
       
        props = cs.getProps();
        //Check properties
        assertTrue("check CheckService invocation -1.1", ((Boolean)props.get("result")).booleanValue());
        assertEquals("check void bind invocation -1.1 ("+((Integer)props.get("voidB")).intValue()+")", ((Integer)props.get("voidB")).intValue(), 1);
View Full Code Here

Examples of org.apache.felix.ipojo.test.scenarios.service.dependency.service.FooService.foo()

        assertEquals("check modify -1 (" + ((Integer)props.get("modified")).intValue() + ")", ((Integer)props.get("modified")).intValue(), 1);

        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), fooProvider.getInstanceName());
        FooService fs = (FooService) getContext().getService(ref);
       
        fs.foo(); // Update
       
        props = cs.getProps();
        //Check properties
        assertEquals("check modify -1.1", ((Integer)props.get("modified")).intValue(), 3);
       
View Full Code Here

Examples of org.apache.felix.ipojo.test.scenarios.service.dependency.service.FooService.foo()

        assertEquals("check modify -1 (" + ((Integer)props.get("modified")).intValue() + ")", ((Integer)props.get("modified")).intValue(), 1);

        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), fooProvider.getInstanceName());
        FooService fs = (FooService) getContext().getService(ref);
       
        fs.foo(); // Update
       
        props = cs.getProps();
        //Check properties
        assertEquals("check modify -1.1", ((Integer)props.get("modified")).intValue(), 3);
       
View Full Code Here

Examples of org.apache.felix.ipojo.test.scenarios.service.dependency.service.FooService.foo()

        assertEquals("check modify -1 (" + ((Integer)props.get("modified")).intValue() + ")", ((Integer)props.get("modified")).intValue(), 1);

        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), fooProvider.getInstanceName());
        FooService fs = (FooService) getContext().getService(ref);
       
        fs.foo(); // Update
       
        props = cs.getProps();
        //Check properties
        assertEquals("check modify -1.1", ((Integer)props.get("modified")).intValue(), 3);
       
View Full Code Here

Examples of org.apache.felix.ipojo.test.scenarios.service.dependency.service.FooService.foo()

        assertEquals("check modify -1 (" + ((Integer)props.get("modified")).intValue() + ")", ((Integer)props.get("modified")).intValue(), 1);

        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), fooProvider.getInstanceName());
        FooService fs = (FooService) getContext().getService(ref);
       
        fs.foo(); // Update
       
        props = cs.getProps();
        //Check properties
        assertEquals("check modify -1.1", ((Integer)props.get("modified")).intValue(), 3);
       
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.