Package org.springframework.osgi.samples.simpleservice

Examples of org.springframework.osgi.samples.simpleservice.MyService


  public void testSimpleServiceExported() {
    waitOnContextCreation("org.springframework.osgi.samples.simpleservice");
        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


* @author Adrian Colyer
*/
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

Related Classes of org.springframework.osgi.samples.simpleservice.MyService

Copyright © 2018 www.massapicom. 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.