Package org.apache.felix.ipojo.test.scenarios.service.dependency.service

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


        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

        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

        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

        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

            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

        // Increase the second provider grade.
        ServiceReference fs_ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), fooProvider2.getInstanceName());
        assertNotNull("Check foo service (2) reference", fs_ref);
        FooService fs = (FooService) getContext().getService(fs_ref);
       
        fs.foo(); // Increase the grade (now = 2)
       
        cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance1.getInstanceName());
        assertNotNull("Check CheckService availability", cs_ref);
        cs = (CheckService) getContext().getService(cs_ref);
        // Check grade
View Full Code Here

       
        // Increase the other provider grade.
        fs_ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), fooProvider.getInstanceName());
        assertNotNull("Check foo service (1) reference", fs_ref);
        fs = (FooService) getContext().getService(fs_ref);
        fs.foo(); //(grade = 3)
       
        cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance1.getInstanceName());
        assertNotNull("Check CheckService availability", cs_ref);
        cs = (CheckService) getContext().getService(cs_ref);
        // Check grade
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.