Package org.apache.aries.isolated.sample

Examples of org.apache.aries.isolated.sample.HelloWorld


   
    return manager.update(app, newApp.getDeploymentMetadata());
  }
 
  private void assertAppMessage(String message) throws Exception {
    HelloWorld hw = IsolationTestUtils.findHelloWorldService(bundleContext, SAMPLE_APP_NAME);
    assertNotNull(hw);
    assertEquals(message, hw.getMessage());
  }
View Full Code Here


        final Object hw = tracker.waitForService(DEFAULT_TIMEOUT);
        tracker.close();
 
        if (hw != null) {
          // proxy because the class space between the sample app and the test bundle is not consistent
          return new HelloWorld() {
            public String getMessage() {
              try {
                Method m = hw.getClass().getMethod("getMessage");
                return (String) m.invoke(hw);
              } catch (Exception e) {
View Full Code Here

    assertHelloWorldService(appName, "hello world");
  }
 
  private void assertHelloWorldService(String appName, String message) throws Exception
  {
    HelloWorld hw = IsolationTestUtils.findHelloWorldService(bundleContext, appName);
    assertNotNull("The Hello World service could not be found.", hw);
    assertEquals(message, hw.getMessage());
  }
View Full Code Here

        //now just make sure we can see it through the context of our config admin bundle context (should be in the same scope)
        ServiceReference ref = ctx.getServiceReference(ConfigurationAdmin.class.getName());
        Assert.assertNotNull("Couldn't find the ManagedService using the ConfigAdmin bundle context", new RichBundleContext(ref.getBundle().getBundleContext()).getService(ManagedService.class, "(" + Constants.SERVICE_PID + "=" + pid + ")"));
       
        //make sure we have the helloworld service registered
        HelloWorld helloWorldBluePrint = IsolationTestUtils.findHelloWorldService(ctx);
        Assert.assertNotNull("Missing the HelloWorld service", helloWorldBluePrint);       
    }
View Full Code Here

      final Object hw = tracker.waitForService(DEFAULT_TIMEOUT);
      tracker.close();

      if (hw != null) {
        // proxy because the class space between the sample app and the test bundle is not consistent
        return new HelloWorld() {
          public String getMessage() {
            try {
              Method m = hw.getClass().getMethod("getMessage");
              return (String) m.invoke(hw);
            } catch (Exception e) {
View Full Code Here

    assertHelloWorldService(appName, "hello world");
  }
 
  private void assertHelloWorldService(String appName, String message) throws Exception
  {
    HelloWorld hw = IsolationTestUtils.findHelloWorldService(bundleContext, appName);
    assertNotNull(hw);
    assertEquals(message, hw.getMessage());
  }
View Full Code Here

   
    return manager.update(app, newApp.getDeploymentMetadata());
  }
 
  private void assertAppMessage(String message) throws Exception {
    HelloWorld hw = IsolationTestUtils.findHelloWorldService(bundleContext, SAMPLE_APP_NAME);
    assertNotNull(hw);
    assertEquals(message, hw.getMessage());
  }
View Full Code Here

TOP

Related Classes of org.apache.aries.isolated.sample.HelloWorld

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.