Package org.ops4j.pax.tinybundles.core

Examples of org.ops4j.pax.tinybundles.core.TinyBundle.build()


            bundle.add(c);
        }

        bundle.set(Constants.BUNDLE_SYMBOLICNAME,"org.apache.sling.common.log.testbundle")
              .set(Constants.BUNDLE_ACTIVATOR , WebConsoleTestActivator.class.getName());
        return provision(bundle.build(withBnd()));

    }

    @Before
    public void setUp() throws IOException {
View Full Code Here


    private Option createTestBundle() {
        TinyBundle bundle = bundle()
                .add(MDCStateServlet.class)
                .set(Constants.BUNDLE_SYMBOLICNAME,"org.apache.sling.extensions.slf4j.mdc.testbundle")
                .set(Constants.BUNDLE_ACTIVATOR , MDCStateServlet.class.getName());
        return provision(bundle.build(withBnd()));
    }

    private static String getServerPort() {
        return System.getProperty(HTTP_PORT_PROP, DEFAULT_PORT);
    }
View Full Code Here

                "org.openengsb.core.api.model, org.osgi.framework, org.slf4j, "
                        + "org.openengsb.labs.delegation.service")
            .set(delegationHeader, "org.openengsb.itests.exam.models.*")
            .set(org.openengsb.core.api.Constants.PROVIDE_MODELS_HEADER, "true");
        Bundle providerBundle = getBundleContext().installBundle("test://testlocation/test.provider.jar",
            providerTinyBundle.build());
        providerBundle.start();
        providerInstalled = true;
    }

    protected ModelDescription getTestModelDescription() {
View Full Code Here

            TinyBundle bundle = TinyBundles.bundle(StoreFactory.anonymousStore())
                .set(Constants.FRAGMENT_HOST, "org.ops4j.pax.exam.sample9.pde")
                .set(Constants.BUNDLE_MANIFESTVERSION, "2")
                .set(Constants.BUNDLE_SYMBOLICNAME, "org.ops4j.pax.exam.sample9.fragment")
                .add("messages.properties", getClass().getResource("/messages.properties"));
            return bundle.build();
        }
        catch (IOException e) {
            throw new TestContainerException(e);
        }
View Full Code Here

            .set(Constants.BUNDLE_SYMBOLICNAME, "org.ops4j.pax.exam.sample9.fragment")
            .add("messages.properties", getClass().getResource("/messages.properties"));

        try {
            Store<InputStream> store = StoreFactory.anonymousStore();
            Handle handle = store.store(bundle.build());
            return store.getLocation(handle).toURL();
        }
        catch (IOException e) {
            throw new TestContainerException(e);
        }
View Full Code Here

            .set(Constants.BUNDLE_SYMBOLICNAME, "PAXExamConfigurationOption-" + UUID.randomUUID());
        bundle.set(Constants.IMPORT_PACKAGE,
            "org.osgi.framework,org.osgi.service.cm,org.osgi.util.tracker,org.slf4j");
        bundle.set(Constants.BUNDLE_ACTIVATOR, ConfigurationOptionActivator.class.getName());
        bundle.set(Constants.BUNDLE_MANIFESTVERSION, "2");
        return CoreOptions.streamBundle(bundle.build()).startLevel(1).start(true).update(false);
    }

}
View Full Code Here

        }

        constructProbeTag(extraProperties);
        try {
            TinyBundle bundle = prepareProbeBundle(createExtraIgnores());
            return new DefaultTestProbeProvider(getTests(), store, store.store(bundle
                .build(withClassicBuilder())));

        }
        catch (IOException e) {
            throw new TestContainerException(e);
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.