Package org.ops4j.pax.exam

Examples of org.ops4j.pax.exam.TestProbeProvider


    @Test
    public void bareRunTest() throws Exception {
        Option[] options = new Option[] {};
        ExamSystem system = createTestSystem(options);
        TestProbeProvider p = makeProbe(system);

        // the parse will split all single containers
        for (TestContainer testContainer : getTestContainerFactory().create(system)) {
            try {
                testContainer.start();
                testContainer.install(p.getStream());
                for (TestAddress test : p.getTests()) {
                    testContainer.call(test);
                }
            }
            finally {
                testContainer.stop();
View Full Code Here


            mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.junit",
                "4.9_2"),
            systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"), };

        ExamSystem system = createTestSystem(options);
        TestProbeProvider p = makeProbe(system);

        // the parse will split all single containers
        for (TestContainer testContainer : getTestContainerFactory().create(system)) {
            try {
                testContainer.start();
                testContainer.install(p.getStream());
                for (TestAddress test : p.getTests()) {
                    testContainer.call(test);
                }
            }
            catch (Exception e) {
                e.printStackTrace();
View Full Code Here

        Option[] options = new Option[] {
            mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.junit",
                "4.9_2"),
            systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG") };
        ExamSystem system = createTestSystem(options);
        TestProbeProvider p = makeProbe(system);

        TestContainer[] containers = PaxExamRuntime.getTestContainerFactory().create(system);

        for (TestContainer testContainer : containers) {
            testContainer.start();
        }
        try {
            for (TestContainer testContainer : containers) {
                testContainer.install(p.getStream());
            }

            for (TestContainer testContainer : containers) {
                for (TestAddress test : p.getTests()) {
                    testContainer.call(test);
                }
            }
        }
        catch (Exception e) {
View Full Code Here

    }

    private ZipFile localCopy(WarProbeOption option) throws IOException {
        TestProbeBuilder builder = builder(option);
        builder.setTempDir(tempDir);
        TestProbeProvider provider = builder.build();
        InputStream is = provider.getStream();
        File out = new File("target/out.war");
        StreamUtils.copyStream(is, new FileOutputStream(out), true);
        return new ZipFile(out);
    }
View Full Code Here

public class WarTestProbeBuilderTest {

    @Test
    public void createWarTestProbe() throws IOException {
        TestProbeBuilder builder = new WarTestProbeBuilderImpl(DefaultExamSystem.createTempDir());
        TestProbeProvider provider = builder.build();
        InputStream is = provider.getStream();
        StreamUtils.copyStream(is, new FileOutputStream("target/out.war"), true);
    }
View Full Code Here

TOP

Related Classes of org.ops4j.pax.exam.TestProbeProvider

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.