use of org.apache.aries.subsystem.core.internal.BasicSubsystem in project aries by apache.
the class Aries1419Test method testRequireCapability.
@Test
public void testRequireCapability() throws Exception {
Subsystem applicationA = installSubsystemFromFile(APPLICATION_A);
try {
Bundle bundleA = getConstituentAsBundle(applicationA, BUNDLE_A, null, null);
String expectedStr = bundleA.getHeaders().get(Constants.REQUIRE_CAPABILITY);
RequireCapabilityHeader expected = new RequireCapabilityHeader(expectedStr);
Map<String, String> headers = ((BasicSubsystem) applicationA).getDeploymentHeaders();
String actualStr = headers.get(Constants.REQUIRE_CAPABILITY);
RequireCapabilityHeader actual = new RequireCapabilityHeader(actualStr);
assertEquals("Wrong header", expected, actual);
} finally {
uninstallSubsystemSilently(applicationA);
}
}
use of org.apache.aries.subsystem.core.internal.BasicSubsystem in project aries by apache.
the class Aries1421Test method testImportPackageVersionRanges.
@Test
public void testImportPackageVersionRanges() throws Exception {
Subsystem applicationA = installSubsystemFromFile(APPLICATION_A);
try {
Bundle bundleA = getConstituentAsBundle(applicationA, BUNDLE_A, null, null);
String expectedStr = bundleA.getHeaders().get(Constants.IMPORT_PACKAGE);
ImportPackageHeader expected = new ImportPackageHeader(expectedStr);
Map<String, String> headers = ((BasicSubsystem) applicationA).getDeploymentHeaders();
String actualStr = headers.get(Constants.IMPORT_PACKAGE);
ImportPackageHeader actual = new ImportPackageHeader(actualStr);
assertEquals("Wrong header", expected, actual);
} finally {
uninstallSubsystemSilently(applicationA);
}
}
Aggregations