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

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


     */
    public void testBundleContext() {
        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);
        Properties p = fs.fooProps();
        assertNotNull("Check the bundle context", p.get("context"));
        assertEquals("Check the creation of 1 object",1, ((PrimitiveInstanceDescription) lazzyArch.getInstanceDescription()).getCreatedObjects().length);
    }

    /**
 
View Full Code Here


     * Test a custom constructor.
     * Not manipulated.
     */
    public void testCustomConstuctor() {
        FooService fs = new FooProviderType1(0, "foo", getContext());
        Properties props = fs.fooProps();
        assertEquals("Check bar", 0, ((Integer) props.get("bar")).intValue());
        assertEquals("Check foo", "foo", props.get("foo"));
        assertEquals("Check context", getContext(), props.get("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.