Package org.springframework.osgi.samples.simpleservice

Examples of org.springframework.osgi.samples.simpleservice.MyService.stringValue()


        ServiceReference ref = bundleContext.getServiceReference(MyService.class.getName());
        assertNotNull("Service Reference is null", ref);
        try {
            MyService simpleService = (MyService) bundleContext.getService(ref);
            assertNotNull("Cannot find the service", simpleService);
            assertEquals("simple service at your service", simpleService.stringValue());
        } finally {
            bundleContext.ungetService(ref);
        }
  }
 
View Full Code Here


*/
public class MyServiceTest extends TestCase {

  public void testStringValue() {
    MyService service = new MyServiceImpl();
    assertEquals("simple service at your service",service.stringValue());
  }
 
}
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.