Search in sources :

Example 76 with Subsystem

use of org.osgi.service.subsystem.Subsystem in project aries by apache.

the class Aries1442Test method createFeature.

private Subsystem createFeature() throws Exception {
    Subsystem root = getRootSubsystem();
    Subsystem feature = installSubsystem(root, "feature", new SubsystemArchiveBuilder().symbolicName("feature").type(SubsystemConstants.SUBSYSTEM_TYPE_FEATURE).bundle("a", new BundleArchiveBuilder().symbolicName("a").exportPackage("a").build()).build(), true);
    uninstallableSubsystems.add(feature);
    startSubsystem(feature, true);
    stoppableSubsystems.add(feature);
    return feature;
}
Also used : SubsystemArchiveBuilder(org.apache.aries.subsystem.itests.util.SubsystemArchiveBuilder) BundleArchiveBuilder(org.apache.aries.subsystem.itests.util.BundleArchiveBuilder) Subsystem(org.osgi.service.subsystem.Subsystem)

Example 77 with Subsystem

use of org.osgi.service.subsystem.Subsystem in project aries by apache.

the class Aries1442Test method testPersistedFeature.

@Test
public void testPersistedFeature() throws Exception {
    createFeature();
    restartSubsystemsImplBundle();
    Subsystem root = getRootSubsystem();
    Subsystem feature = getChild(root, "feature", null, SubsystemConstants.SUBSYSTEM_TYPE_FEATURE);
    assertFeature(feature);
}
Also used : Subsystem(org.osgi.service.subsystem.Subsystem) Test(org.junit.Test) SubsystemTest(org.apache.aries.subsystem.itests.SubsystemTest)

Example 78 with Subsystem

use of org.osgi.service.subsystem.Subsystem in project aries by apache.

the class SubsystemDependency_4BTest method verifyBundleCWiredToPackage_xFromBundleA.

@Test
public void verifyBundleCWiredToPackage_xFromBundleA() throws Exception {
    Subsystem s = installSubsystemFromFile(APPLICATION_B);
    startSubsystem(s);
    verifySinglePackageWiring(s, BUNDLE_C, "x", BUNDLE_A);
    stopSubsystem(s);
}
Also used : Subsystem(org.osgi.service.subsystem.Subsystem) Test(org.junit.Test)

Example 79 with Subsystem

use of org.osgi.service.subsystem.Subsystem in project aries by apache.

the class SubsystemDependency_4BTest method verifyBundleDWiredToBundleA.

@Test
public void verifyBundleDWiredToBundleA() throws Exception {
    Subsystem s = installSubsystemFromFile(APPLICATION_B);
    startSubsystem(s);
    verifyRequireBundleWiring(s, BUNDLE_D, BUNDLE_A);
    stopSubsystem(s);
}
Also used : Subsystem(org.osgi.service.subsystem.Subsystem) Test(org.junit.Test)

Example 80 with Subsystem

use of org.osgi.service.subsystem.Subsystem in project aries by apache.

the class SubsystemDependency_4BTest method verifyBundleEWiredToCapability_yFromBundleB.

@Test
public void verifyBundleEWiredToCapability_yFromBundleB() throws Exception {
    Subsystem s = installSubsystemFromFile(APPLICATION_B);
    startSubsystem(s);
    verifyCapabilityWiring(s, BUNDLE_E, "y", BUNDLE_B);
    stopSubsystem(s);
}
Also used : Subsystem(org.osgi.service.subsystem.Subsystem) Test(org.junit.Test)

Aggregations

Subsystem (org.osgi.service.subsystem.Subsystem)202 Test (org.junit.Test)151 SubsystemTest (org.apache.aries.subsystem.itests.SubsystemTest)78 AriesSubsystem (org.apache.aries.subsystem.AriesSubsystem)52 SubsystemException (org.osgi.service.subsystem.SubsystemException)50 Bundle (org.osgi.framework.Bundle)48 SubsystemArchiveBuilder (org.apache.aries.subsystem.itests.util.SubsystemArchiveBuilder)31 BundleArchiveBuilder (org.apache.aries.subsystem.itests.util.BundleArchiveBuilder)22 BasicSubsystem (org.apache.aries.subsystem.core.internal.BasicSubsystem)19 IOException (java.io.IOException)13 Hashtable (java.util.Hashtable)9 ServiceReference (org.osgi.framework.ServiceReference)8 File (java.io.File)7 BundleContext (org.osgi.framework.BundleContext)7 ArrayList (java.util.ArrayList)6 TestCapability (org.apache.aries.subsystem.itests.util.TestCapability)6 ByteArrayInputStream (java.io.ByteArrayInputStream)5 FileInputStream (java.io.FileInputStream)5 Callable (java.util.concurrent.Callable)5 BundleException (org.osgi.framework.BundleException)5