Package org.apache.felix.ipojo.runtime.core.services

Examples of org.apache.felix.ipojo.runtime.core.services.CheckService.map()


        configuration.put("instance.bundle.context", bc);
        ComponentInstance instance = ipojoHelper.createComponentInstance("CTX-Field-Instance", configuration);

        CheckService check = ipojoHelper.getServiceObjectByName(CheckService.class, instance.getInstanceName());
        assertNotNull(check);
        BundleContext context = (BundleContext) check.map().get("context");
        assertNotNull(context);
        assertEquals(bc, context);
    }

    @Test
View Full Code Here


    @Test
    public void testMethodInjectionOfComponentBundleContextUsingXML() {
        ComponentInstance instance = ipojoHelper.createComponentInstance("CTX-Method-Component");
        CheckService check = ipojoHelper.getServiceObjectByName(CheckService.class, instance.getInstanceName());
        assertNotNull(check);
        BundleContext context = (BundleContext) check.map().get("context");
        assertNotNull(context);
        assertEquals(getTestBundle().getSymbolicName(), context.getBundle().getSymbolicName());
    }

    @Test
View Full Code Here

        configuration.put("instance.bundle.context", bc);
        ComponentInstance instance = ipojoHelper.createComponentInstance("CTX-Method-Instance", configuration);

        CheckService check = ipojoHelper.getServiceObjectByName(CheckService.class, instance.getInstanceName());
        assertNotNull(check);
        BundleContext context = (BundleContext) check.map().get("context");
        assertNotNull(context);
        assertEquals(bc, context);
    }

    @Test
View Full Code Here

    @Test
    public void testConstructorInjectionOfComponentBundleContextUsingXML() {
        ComponentInstance instance = ipojoHelper.createComponentInstance("CTX-Constructor-Component");
        CheckService check = ipojoHelper.getServiceObjectByName(CheckService.class, instance.getInstanceName());
        assertNotNull(check);
        BundleContext context = (BundleContext) check.map().get("context");
        assertNotNull(context);
        assertEquals(getTestBundle().getSymbolicName(), context.getBundle().getSymbolicName());
    }

    @Test
View Full Code Here

        configuration.put("instance.bundle.context", bc);
        ComponentInstance instance = ipojoHelper.createComponentInstance("CTX-Constructor-Instance", configuration);

        CheckService check = ipojoHelper.getServiceObjectByName(CheckService.class, instance.getInstanceName());
        assertNotNull(check);
        BundleContext context = (BundleContext) check.map().get("context");
        assertNotNull(context);
        assertEquals(bc, context);
    }

}
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.