本文整理汇总了Java中org.ops4j.pax.exam.TestProbeBuilder.setHeader方法的典型用法代码示例。如果您正苦于以下问题:Java TestProbeBuilder.setHeader方法的具体用法?Java TestProbeBuilder.setHeader怎么用?Java TestProbeBuilder.setHeader使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.ops4j.pax.exam.TestProbeBuilder
的用法示例。
在下文中一共展示了TestProbeBuilder.setHeader方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: probeConfiguration
import org.ops4j.pax.exam.TestProbeBuilder; //导入方法依赖的package包/类
/**
* Builds the probe.
*
* @param probe The probe builder.
* @return The probe builder.
*/
@ProbeBuilder
public TestProbeBuilder probeConfiguration(TestProbeBuilder probe) {
probe.setHeader(Constants.IMPORT_PACKAGE, "*,org.apache.ignite.osgi.activators;resolution:=\"optional\"");
return probe;
}
示例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, EXECUTE_PROBE, time);
} catch (Exception e) {
// cleanup
after();
throw e;
}
}
示例3: 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;
}
}
示例4: probeConfiguration
import org.ops4j.pax.exam.TestProbeBuilder; //导入方法依赖的package包/类
/**
* @param probe
* @return
*/
@ProbeBuilder
public TestProbeBuilder probeConfiguration(TestProbeBuilder probe) {
// makes sure the generated Test-Bundle contains this import!
probe.setHeader(Constants.BUNDLE_SYMBOLICNAME, "de.nierbeck.camel.exam.demo.route-control-test");
probe.setHeader(Constants.DYNAMICIMPORT_PACKAGE, "de.nierbeck.camel.exam.demo.control,*,org.apache.felix.service.*;status=provisional");
return probe;
}
示例5: probeConfiguration
import org.ops4j.pax.exam.TestProbeBuilder; //导入方法依赖的package包/类
@ProbeBuilder
public TestProbeBuilder probeConfiguration(TestProbeBuilder probe) {
probe.setHeader(Constants.DYNAMICIMPORT_PACKAGE, "*,org.apache.felix.service.*;status=provisional");
return probe;
}
示例6: probeConfiguration
import org.ops4j.pax.exam.TestProbeBuilder; //导入方法依赖的package包/类
@ProbeBuilder
public TestProbeBuilder probeConfiguration(TestProbeBuilder probe) {
probe.setHeader(Constants.DYNAMICIMPORT_PACKAGE, "*,org.apache.felix.service.*,org.apache.http.client.methods;status=provisional");
return probe;
}
示例7: probeConfiguration
import org.ops4j.pax.exam.TestProbeBuilder; //导入方法依赖的package包/类
@ProbeBuilder
public TestProbeBuilder probeConfiguration(TestProbeBuilder probe) {
// makes sure the generated Test-Bundle contains this import!
probe.setHeader(Constants.DYNAMICIMPORT_PACKAGE, "*");
return probe;
}
示例8: build
import org.ops4j.pax.exam.TestProbeBuilder; //导入方法依赖的package包/类
@ProbeBuilder
public TestProbeBuilder build(TestProbeBuilder builder) {
return builder.setHeader("Export-Package", "org.motechproject.event.domain");
}
示例9: probeConfiguration
import org.ops4j.pax.exam.TestProbeBuilder; //导入方法依赖的package包/类
@ProbeBuilder
public TestProbeBuilder probeConfiguration(TestProbeBuilder probe) {
probe.setHeader(Constants.DYNAMICIMPORT_PACKAGE, "*,org.ops4j.pax.exam.options.*,org.apache.felix.service.*;status=provisional");
return probe;
}
示例10: probeConfiguration
import org.ops4j.pax.exam.TestProbeBuilder; //导入方法依赖的package包/类
/**
* @param probe
* @return
*/
@ProbeBuilder
public TestProbeBuilder probeConfiguration(TestProbeBuilder probe) {
probe.setHeader(Constants.DYNAMICIMPORT_PACKAGE, "*,org.apache.felix.service.*;status=provisional");
return probe;
}
示例11: probeConfiguration
import org.ops4j.pax.exam.TestProbeBuilder; //导入方法依赖的package包/类
@ProbeBuilder
public static TestProbeBuilder probeConfiguration(TestProbeBuilder probe) {
probe.setHeader(Constants.DYNAMICIMPORT_PACKAGE, "*,org.apache.felix.service.*;status=provisional");
return probe;
}
示例12: probeConfiguration
import org.ops4j.pax.exam.TestProbeBuilder; //导入方法依赖的package包/类
@ProbeBuilder
public TestProbeBuilder probeConfiguration(TestProbeBuilder probe) {
probe.setHeader(Constants.DYNAMICIMPORT_PACKAGE, "*,org.apache.felix.service.*;status=provisional");
return probe;
}
示例13: probeConfiguration
import org.ops4j.pax.exam.TestProbeBuilder; //导入方法依赖的package包/类
@ProbeBuilder
public TestProbeBuilder probeConfiguration(TestProbeBuilder probe) {
probe.setHeader(Constants.DYNAMICIMPORT_PACKAGE,
"*,org.apache.felix.service.*;status=provisional");
return probe;
}