public abstract class KarafTestCase extends Object
Modifier and Type | Field and Description |
---|---|
protected org.osgi.framework.BundleContext |
bundleContext |
protected org.apache.karaf.features.FeaturesService |
featuresService |
Constructor and Description |
---|
KarafTestCase() |
Modifier and Type | Method and Description |
---|---|
protected void |
addFeaturesUrl(String url) |
org.ops4j.pax.exam.Option[] |
config()
This is the default
Configuration for any Pax Exam tests that
use this abstract base class. |
protected org.ops4j.pax.exam.Option[] |
configAsArray() |
protected List<org.ops4j.pax.exam.Option> |
configAsList() |
protected String |
executeCommand(String command)
Executes a shell command and returns output as a String.
|
protected <T> T |
getOsgiService(Class<T> type) |
protected void |
installFeature(String featureName) |
org.ops4j.pax.exam.TestProbeBuilder |
probeConfiguration(org.ops4j.pax.exam.TestProbeBuilder probe)
This
ProbeBuilder can be used to add OSGi metadata to the test
probe bundle. |
@Inject protected org.osgi.framework.BundleContext bundleContext
@Inject protected org.apache.karaf.features.FeaturesService featuresService
public org.ops4j.pax.exam.TestProbeBuilder probeConfiguration(org.ops4j.pax.exam.TestProbeBuilder probe)
ProbeBuilder
can be used to add OSGi metadata to the test
probe bundle. We only use it to give the bundle a nice human-readable name
of "org.opennms.core.test.karaf.test".public org.ops4j.pax.exam.Option[] config()
Configuration
for any Pax Exam tests that
use this abstract base class. If you wish to add more Configuration parameters,
you should call configAsList()
, append the Option
values
to the list, and then return it in a Configuration
function that
overrides config()
.protected List<org.ops4j.pax.exam.Option> configAsList()
protected org.ops4j.pax.exam.Option[] configAsArray()
protected void addFeaturesUrl(String url)
protected void installFeature(String featureName)
protected String executeCommand(String command)
command
- protected <T> T getOsgiService(Class<T> type)
Copyright © 2016. All rights reserved.