コード例 #1
0
  @Configuration
  public Option[] config() throws IOException {

    Option[] options = super.config();

    // Build a service bundle
    return OptionUtils.combine(
        options,
        streamBundle(
            TinyBundles.bundle()
                .add(FooService.class)
                .set(Constants.BUNDLE_SYMBOLICNAME, "ServiceInterface")
                .set(Constants.EXPORT_PACKAGE, "org.apache.felix.ipojo.runtime.core.services")
                .build(withBnd())),
        streamBundle(
            TinyBundles.bundle()
                .add(MyComponent.class)
                .add(ConfigureOneInstance.class)
                .set(Constants.BUNDLE_SYMBOLICNAME, "MyComponent")
                .build(IPOJOStrategy.withiPOJO())));
  }
コード例 #2
0
 protected InputStream createTestBundleWithProcessDefinition() {
   try {
     return TinyBundles.bundle()
         .add(
             "OSGI-INF/activiti/example.bpmn20.xml",
             new FileInputStream(new File("src/test/resources/processes/example.bpmn20.xml")))
         .set(Constants.BUNDLE_SYMBOLICNAME, "org.activiti.osgi.example")
         .build();
   } catch (FileNotFoundException fnfe) {
     fail("Failure in createTestBundleWithProcessDefinition " + fnfe.toString());
     return null;
   }
 }
コード例 #3
0
  @Configuration
  public static Option[] configure() throws Exception {
    Option[] options =
        combine(
            getDefaultCamelKarafOptions(),
            // Helper.setLogLevel("INFO"),
            provision(
                TinyBundles.bundle()
                    .add(
                        "META-INF/persistence.xml",
                        BlobStoreBlueprintRouteTest.class.getResource("/META-INF/persistence.xml"))
                    .add(
                        "OSGI-INF/blueprint/test.xml",
                        BlobStoreBlueprintRouteTest.class.getResource("blueprintCamelContext.xml"))
                    .set(Constants.BUNDLE_SYMBOLICNAME, "CamelBlueprintJcloudsTestBundle")
                    .set(Constants.DYNAMICIMPORT_PACKAGE, "*")
                    .set("Meta-Persistence", "META-INF/persistence.xml")
                    .build()),
            bundle(
                    TinyBundles.bundle()
                        .add(
                            "OSGI-INF/blueprint/test.xml",
                            BlobStoreBlueprintRouteTest.class.getResource(
                                "blueprintBlobStoreService.xml"))
                        .set(
                            Constants.BUNDLE_SYMBOLICNAME,
                            "org.apache.camel.jclouds.blobstore.service")
                        .set(Constants.BUNDLE_VERSION, "1.0.0")
                        .set(Constants.DYNAMICIMPORT_PACKAGE, "*")
                        .build())
                .start(),

            // using the features to install the camel components
            loadCamelFeatures("camel-blueprint", "camel-jclouds"),
            workingDirectory("target/paxrunner/"));

    return options;
  }
コード例 #4
0
 protected InputStream createTestBundleWithProcessEngineConfiguration() {
   try {
     return TinyBundles.bundle()
         .add(
             "OSGI-INF/blueprint/context.xml",
             new FileInputStream(new File("src/test/resources/config/context.xml")))
         .set(Constants.BUNDLE_SYMBOLICNAME, "org.activiti.osgi.config")
         .set(Constants.DYNAMICIMPORT_PACKAGE, "*")
         .build();
   } catch (FileNotFoundException fnfe) {
     fail("Failure in createTestBundleWithProcessEngineConfiguration " + fnfe.toString());
     return null;
   }
 }
コード例 #5
0
  @Configuration
  public Option[] config() {
    return options(
        systemProperty("osgi.console").value("2401"),
        systemProperty("osgi.bundles.defaultStartLevel").value("4"),
        systemProperty("pax.exam.osgi.unresolved.fail").value("true"),
        systemPackages("sun.nio.ch"),
        testingModules(),
        loggingModules(),
        mdSalCoreBundles(),
        bindingAwareSalBundles(),
        configMinumumBundles(),
        baseModelBundles(),
        flowCapableModelBundles(),
        junitAndMockitoBundles(),

        // Classes from test-jars bundled for pax-exam test
        streamBundle(
            TinyBundles.bundle()
                .add(TestingNetconfClient.class)
                .add(XmlFileLoader.class)
                .add(
                    "/netconfMessages/editConfig_identities.xml",
                    XmlFileLoader.class.getResource("/netconfMessages/editConfig_identities.xml"))
                .add(
                    "/netconfMessages/commit.xml",
                    XmlFileLoader.class.getResource("/netconfMessages/commit.xml"))
                .add(
                    "/netconfMessages/getConfig.xml",
                    XmlFileLoader.class.getResource("/netconfMessages/getConfig.xml"))
                .set(Constants.BUNDLE_SYMBOLICNAME, "TestingClient_bundle")
                .set(
                    Constants.EXPORT_PACKAGE,
                    "org.opendaylight.controller.netconf.client.test, "
                        + "org.opendaylight.controller.netconf.util.test")
                .build(TinyBundles.withBnd())));
  }