コード例 #1
0
  /** @throws java.lang.Exception */
  @Before
  public void setUp() throws Exception {
    String symbolicName = getClass().getSimpleName();

    this.bundleContext =
        CamelBlueprintHelper.createBundleContext(
            symbolicName, getBundleFilter(), createTinyBundle());

    // must wait for blueprint container to be published then the namespace
    // parser is complete and we are ready for testing
    LOG.debug("Waiting for BlueprintContainer to be published with symbolicName: {}", symbolicName);
    getOsgiService(
        BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=" + symbolicName + ")");
  }
コード例 #2
0
 protected <T> T getOsgiService(Class<T> type, long timeout) {
   return CamelBlueprintHelper.getOsgiService(bundleContext, type, timeout);
 }
コード例 #3
0
 /** @throws java.lang.Exception */
 @After
 public void tearDown() throws Exception {
   CamelBlueprintHelper.disposeBundleContext(bundleContext);
   CamelTestSupport.deleteDirectory("target/bundles");
 }
コード例 #4
0
 protected <T> T getOsgiService(Class<T> type, String filter) {
   return CamelBlueprintHelper.getOsgiService(bundleContext, type, filter);
 }