use of org.apache.karaf.features.internal.support.TestDownloadManager in project karaf by apache.
the class SubsystemTest method testConditionalUnsatisfiedWithOptional.
@Test
public void testConditionalUnsatisfiedWithOptional() throws Exception {
RepositoryImpl repo = new RepositoryImpl(getClass().getResource("data4/features.xml").toURI());
Map<String, Set<String>> features = new HashMap<>();
addToMapSet(features, "root/apps1", "f1");
Map<String, Set<String>> expected = new HashMap<>();
addToMapSet(expected, "root/apps1", "a/1.0.0");
SubsystemResolver resolver = new SubsystemResolver(this.resolver, new TestDownloadManager(getClass(), "data4"));
resolver.prepare(Arrays.asList(repo.getFeatures()), features, Collections.emptyMap());
resolver.resolve(Collections.emptySet(), FeaturesService.DEFAULT_FEATURE_RESOLUTION_RANGE, null, null, null);
verify(resolver, expected);
}
use of org.apache.karaf.features.internal.support.TestDownloadManager in project karaf by apache.
the class SubsystemTest method testResourceRepositories.
@Test
public void testResourceRepositories() throws Exception {
RepositoryImpl repo = new RepositoryImpl(getClass().getResource("data7/features.xml").toURI());
Map<String, Set<String>> features = new HashMap<>();
addToMapSet(features, "root", "f1");
addToMapSet(features, "root/apps1", "f2");
Map<String, Set<String>> expected = new HashMap<>();
addToMapSet(expected, "root", "a/1.0.0");
addToMapSet(expected, "root", "c/1.0.0");
addToMapSet(expected, "root/apps1", "b/1.0.0");
SubsystemResolver resolver = new SubsystemResolver(this.resolver, new TestDownloadManager(getClass(), "data7"));
resolver.prepare(Arrays.asList(repo.getFeatures()), features, Collections.emptyMap());
resolver.resolve(Collections.emptySet(), FeaturesService.DEFAULT_FEATURE_RESOLUTION_RANGE, null, null, null);
verify(resolver, expected);
}
Aggregations