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

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


        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

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

      // Check field value
      FooService fs = (FooService) getContext().getService(fooRef);
      Properties p = fs.fooProps();
      fooP = (String) p.get("foo");
      barP = (Integer) p.get("bar");

      assertEquals("Check foo field equality", fooP, "oof");
      assertEquals("Check bar field equality", barP, new Integer(0));
View Full Code Here

      barP = (Integer) p.get("bar");

      assertEquals("Check foo field equality", fooP, "oof");
      assertEquals("Check bar field equality", barP, new Integer(0));

        Integer updated = (Integer) fs.fooProps().get("updated");

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

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

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

        // Check field value
        FooService fs = (FooService) getContext().getService(fooRef);
        Properties p = fs.fooProps();
        fooP = (String) p.get("foo");
        barP = (Integer) p.get("bar");

        assertEquals("Check foo field equality", fooP, "oof");
        assertEquals("Check bar field equality", barP, new Integer(0));
View Full Code Here

        barP = (Integer) p.get("bar");

        assertEquals("Check foo field equality", fooP, "oof");
        assertEquals("Check bar field equality", barP, new Integer(0));

        Integer updated = (Integer) fs.fooProps().get("updated");

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

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

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

    // Check field value
    FooService fs = (FooService) getContext().getService(fooRef);
    Properties p = fs.fooProps();
    fooP = (String) p.get("foo");
    barP = (Integer) p.get("bar");

    assertEquals("Check foo field equality", fooP, "oof");
    assertEquals("Check bar field equality", barP, new Integer(0));
View Full Code Here

    barP = (Integer) p.get("bar");

    assertEquals("Check foo field equality", fooP, "oof");
    assertEquals("Check bar field equality", barP, new Integer(0));

    Integer updated = (Integer) fs.fooProps().get("updated");

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

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

  public void testComponentTypeConfiguration() {
    ServiceReference ref = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), fooProvider1.getInstanceName());
    assertNotNull("Check FooService availability", ref);
    FooService fs = (FooService) getContext().getService(ref);
    Properties toCheck = fs.fooProps();

    Integer intProp = (Integer) toCheck.get("intProp");
    Boolean boolProp = (Boolean) toCheck.get("boolProp");
    String strProp = (String) toCheck.get("strProp");
    String[] strAProp = (String[]) toCheck.get("strAProp");
View Full Code Here

    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");
    boolProp = (Boolean) toCheck.get("boolProp");
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.