当前位置: 首页>>代码示例>>Java>>正文


Java TestProbeBuilder.build方法代码示例

本文整理汇总了Java中org.ops4j.pax.exam.TestProbeBuilder.build方法的典型用法代码示例。如果您正苦于以下问题:Java TestProbeBuilder.build方法的具体用法?Java TestProbeBuilder.build怎么用?Java TestProbeBuilder.build使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.ops4j.pax.exam.TestProbeBuilder的用法示例。


在下文中一共展示了TestProbeBuilder.build方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: startTestContainer

import org.ops4j.pax.exam.TestProbeBuilder; //导入方法依赖的package包/类
protected static void startTestContainer(String featureName, String bundleName, Option[] additionalOptions, Class<? extends DeploymentProbe> probeClass, PhaseListener phaseListener) throws Exception {
    if (probeClass == null) {
        probeClass = DeploymentProbe.class;
    }
    long time = System.currentTimeMillis();
    system = PaxExamRuntime.createTestSystem(mergeOptions(config(featureName, bundleName), additionalOptions));
    time = post(phaseListener, CREATE_SYSTEM, time);
    testContainer = PaxExamRuntime.createContainer(system);
    time = post(phaseListener, CREATE_CONTAINER, time);
    testContainer.start();
    time = post(phaseListener, START_CONTAINER, time);
    try {
        // install the probe
        TestProbeBuilder probeBuilder = system.createProbe();
        time = post(phaseListener, CREATE_PROBE, time);
        probeBuilder.setHeader(Constants.DYNAMICIMPORT_PACKAGE, "*,org.apache.felix.service.*;status=provisional");
        probeBuilder.addTests(probeClass, probeClass.getMethods());
        time = post(phaseListener, ADD_TESTS, time);
        testProbe = probeBuilder.build();
        time = post(phaseListener, BUILD_PROBE, time);
        testContainer.installProbe(testProbe.getStream());
        time = post(phaseListener, INSTALL_PROBE, time);
        // wait for SwitchYard application activation
        executeProbe("testBundleActivation");
        time = post(phaseListener, EXECUTE_PROBE, time);
    } catch (Exception e) {
        // cleanup
        after();
        throw e;
    }
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:32,代码来源:AbstractQuickstartTest.java

示例2: startTestContainer

import org.ops4j.pax.exam.TestProbeBuilder; //导入方法依赖的package包/类
protected static void startTestContainer(String featureName, String bundleName, Option[] additionalOptions, Class<? extends DeploymentProbe> probeClass, PhaseListener phaseListener) throws Exception {
    if (probeClass == null) {
        probeClass = DeploymentProbe.class;
    }
    long time = System.currentTimeMillis();
    system = PaxExamRuntime.createTestSystem(mergeOptions(config(featureName, bundleName), additionalOptions));
    time = post(phaseListener, CREATE_SYSTEM, time);
    testContainer = PaxExamRuntime.createContainer(system);
    time = post(phaseListener, CREATE_CONTAINER, time);
    testContainer.start();
    time = post(phaseListener, START_CONTAINER, time);
    try {
        // install the probe
        TestProbeBuilder probeBuilder = system.createProbe();
        time = post(phaseListener, CREATE_PROBE, time);
        probeBuilder.setHeader(Constants.DYNAMICIMPORT_PACKAGE, "*,org.apache.felix.service.*;status=provisional");
        probeBuilder.addTests(probeClass, probeClass.getMethods());
        time = post(phaseListener, ADD_TESTS, time);
        testProbe = probeBuilder.build();
        time = post(phaseListener, BUILD_PROBE, time);
        testContainer.installProbe(testProbe.getStream());
        time = post(phaseListener, INSTALL_PROBE, time);
        // wait for SwitchYard application activation
        executeProbe("testBundleActivation");
        time = post(phaseListener, Phase.EXECUTE_PROBE, time);
    } catch (Exception e) {
        // cleanup
        after();
        throw e;
    }
}
 
开发者ID:jboss-integration,项目名称:fuse-bxms-integ,代码行数:32,代码来源:AbstractQuickstartTest.java


注:本文中的org.ops4j.pax.exam.TestProbeBuilder.build方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。