Examples of fooProps()


Examples of org.apache.felix.ipojo.handler.temporal.services.FooService.fooProps()

    public Properties getProps() {
        Iterator it = fs.iterator();
        if (it.hasNext()) {
            FooService svc = (FooService) it.next();
            return svc.fooProps();
        }
        return null;
    }

}
View Full Code Here

Examples of org.apache.felix.ipojo.handler.temporal.services.FooService.fooProps()

    public Properties getProps() {
        Iterator it = fs.iterator();
        if (it.hasNext()) {
            FooService svc = (FooService) it.next();
            return svc.fooProps();
        }
        return null;
    }

}
View Full Code Here

Examples of org.apache.felix.ipojo.runtime.core.components.FooProviderType1.fooProps()

     * Not manipulated.
     */
    @Test
    public void testCustomConstuctor() {
        FooService fs = new FooProviderType1(0, "foo", bc);
        Properties props = fs.fooProps();
        assertEquals("Check bar", 0, ((Integer) props.get("bar")).intValue());
        assertEquals("Check foo", "foo", props.get("foo"));
        assertEquals("Check context", bc, props.get("context"));
    }

View Full Code Here

Examples of org.apache.felix.ipojo.runtime.core.services.FooService.fooProps()

    @Test
    public void testBundleContext() {
        ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), ci_lazzy.getInstanceName());
        assertNotNull("Check that a FooService from " + ci_lazzy.getInstanceName() + " is available", ref);
        FooService fs = (FooService) osgiHelper.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

Examples of org.apache.felix.ipojo.runtime.core.services.FooService.fooProps()

     * Not manipulated.
     */
    @Test
    public void testCustomConstuctor() {
        FooService fs = new FooProviderType1(0, "foo", bc);
        Properties props = fs.fooProps();
        assertEquals("Check bar", 0, ((Integer) props.get("bar")).intValue());
        assertEquals("Check foo", "foo", props.get("foo"));
        assertEquals("Check context", bc, props.get("context"));
    }

View Full Code Here

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

    assertTrue("Check instance validity", under.getState() == ComponentInstance.VALID);
    ServiceContext sc = Utils.getServiceContext(under);
    ServiceReference ref = sc.getServiceReference(FooService.class.getName());
    assertNotNull("Check refs not null", ref);
    FooService foo = (FooService) sc.getService(ref);
    Properties p = foo.fooProps();
    boolean b = ((Boolean) p.get("boolProp")).booleanValue();
    String s = (String) p.get("strProp");
    int i = ( (Integer) p.get("intProp")).intValue();
    assertTrue("Test boolean", b);
    assertEquals("Test string", s, "foo");
View Full Code Here

Examples of org.apache.felix.ipojo.test.scenarios.component.FooProviderType1.fooProps()

     * 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

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

        ServiceReference refx = Utils.getServiceReference(getContext(), FooService.class.getName(), "(instance.name=" + pid + ")");
        assertNotNull("Check refx", refx);
        FooService fs = (FooService) Utils.getServiceObject(getContext(), FooService.class.getName(), "(instance.name=" + pid + ")");
        assertNotNull("Check fs", fs);
       
        Properties p = fs.fooProps();
        String mes = p.getProperty("message");
        int count = ((Integer) p.get("count")).intValue();
        //architecture = (Architecture) Utils.getServiceObject(getContext(), Architecture.class.getName(), "(architecture.instance="+pid+")");
       
        assertEquals("Assert Message", "message", mes);
View Full Code Here

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

    assertEquals("Check bar equality -2", barP, new Integer(2));
    assertEquals("Check baz equality -2", bazP, "zab");

     // Get Service
        FooService fs = (FooService) context.getService(fooRef);
        Integer updated = (Integer) fs.fooProps().get("updated");

        assertEquals("Check updated", 1, updated.intValue());

    getContext().ungetService(msRef);
View Full Code Here

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

        assertEquals("Check bar equality -2", barP, new Integer(2));
        assertEquals("Check baz equality -2", bazP, "zab");

        // Get Service
        FooService fs = (FooService) context.getService(fooRef);
        Integer updated = (Integer) fs.fooProps().get("updated");

        assertEquals("Check updated", 1, updated.intValue());

        getContext().ungetService(msRef);
    }
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.