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

Examples of org.apache.felix.ipojo.test.scenarios.ps.service.FooService.foo()


            if(intAProp[i] != v2[i]) { fail("Check the intAProp Equality"); }
        }
     
      // Invoke
      FooService fs = (FooService) getServiceObject(sr);
      assertTrue("invoke fs", fs.foo());
     
      // Re-check the property (change)
      intProp = (Integer) sr.getProperty("int");
      boolProp = (Boolean) sr.getProperty("boolean");
      strProp = (String) sr.getProperty("string");
View Full Code Here


        assertNull(ref.getProperty("prop1"));
        assertNotNull(ref.getProperty("prop2"));
       
        // Test foo invocation
        FooService fs = (FooService) getServiceObject(ref);
        assertTrue("FooService invocation failed", fs.foo());
       
        ref = getServiceReference(FooService.class.getName(), "(" + "instance.name" + "=" + compName + ")");
        // Check service properties
        assertNotNull(ref.getProperty("prop1"));
        assertNull(ref.getProperty("prop2"));
View Full Code Here

      if(intAProp[i] != v2[i]) { fail("Check the intAProp Equality (1)"); }
    }

    // Invoke
    FooService fs = (FooService) getServiceObject(sr);
    assertTrue("invoke fs", fs.foo());

    sr = helper.getServiceReferenceByName(FooService.class.getName(), "FooProviderAno-1");
    // Re-check the property (change)
    intProp = (Integer) sr.getProperty("int");
    boolProp = (Boolean) sr.getProperty("boolean");
View Full Code Here

 
  public void testSimpleExposition() {
    ServiceReference ref = helper.getServiceReferenceByName(FooService.class.getName(), fooProviderSimple.getInstanceName());
    assertNotNull("Check the availability of the FS from "+fooProviderSimple.getInstanceName(), ref);
    FooService fs = (FooService) getServiceObject(ref);
    assertTrue("Check fs invocation", fs.foo());
    fs = null;
    fooProviderSimple.stop();
    ref = helper.getServiceReferenceByName(FooService.class.getName(), fooProviderSimple.getInstanceName());
    assertNull("Check the absence of the FS from "+fooProviderSimple.getInstanceName(), ref);
   
View Full Code Here

 
  public void testItfExposition() {
    ServiceReference ref = helper.getServiceReferenceByName(FooService.class.getName(), fooProviderItf.getInstanceName());
    assertNotNull("Check the availability of the FS from "+fooProviderItf.getInstanceName(), ref);
    FooService fs = (FooService) getServiceObject(ref);
    assertTrue("Check fs invocation", fs.foo());
    fs = null;
    fooProviderItf.stop();
   
    ref = helper.getServiceReferenceByName(FooService.class.getName(), fooProviderItf.getInstanceName());
    assertNull("Check the absence of the FS from "+fooProviderItf.getInstanceName(), ref);
View Full Code Here

    assertNotNull("Check the availability of the BS from "+fooBarProvider.getInstanceName(), refBar);
   
    assertSame("Check service reference equality", refFoo, refBar);
   
    FooService fs = (FooService) getServiceObject(refFoo);
    assertTrue("Check fs invocation", fs.foo());
    fs = null;
   
    BarService bs = (BarService) getServiceObject(refBar);
    assertTrue("Check bs invocation", bs.bar());
    bs = null;
View Full Code Here

    assertNotNull("Check the availability of the BS from "+fooBarProvider2.getInstanceName(), refBar);
   
    assertSame("Check service reference equality", refFoo, refBar);
   
    FooService fs = (FooService) getServiceObject(refFoo);
    assertTrue("Check fs invocation", fs.foo());
    fs = null;
   
    BarService bs = (BarService) getServiceObject(refBar);
    assertTrue("Check bs invocation", bs.bar());
    bs = null;
View Full Code Here

    assertNotNull("Check the availability of the BS from "+fooBarProvider3.getInstanceName(), refBar);
   
    assertNotSame("Check service reference inequality", refFoo, refBar);
   
    FooService fs = (FooService) getServiceObject(refFoo);
    assertTrue("Check fs invocation", fs.foo());
    fs = null;
   
    BarService bs = (BarService) getServiceObject(refBar);
    assertTrue("Check bs invocation", bs.bar());
    bs = null;
View Full Code Here

      
        assertNull(getServiceReference(CheckService.class.getName()));
        assertNotNull(getServiceReference(FooService.class.getName()));

        FooService fs = (FooService) getServiceObject(FooService.class.getName(), null);
        fs.foo();
       
        assertNull(getServiceReference(CheckService.class.getName()));
        assertNull(getServiceReference(FooService.class.getName()));
       
        ci.dispose();
View Full Code Here

        // CheckService not available
        assertNull(getServiceReference(CheckService.class.getName()));
        assertNotNull(getServiceReference(FooService.class.getName()));

        FooService fs = (FooService) getServiceObject(FooService.class.getName(), null);
        fs.foo();
       
        assertNull(getServiceReference(CheckService.class.getName()));
        assertNull(getServiceReference(FooService.class.getName()));
       
        ci.dispose();
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.