Package org.apache.karaf.features.internal.support

Examples of org.apache.karaf.features.internal.support.TestDownloadManager


        Map<String, Set<String>> expected = new HashMap<String, Set<String>>();
        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(new TestDownloadManager(getClass(), "data1"));
        resolver.prepare(Arrays.asList(repo.getFeatures()),
                         features,
                         Collections.<String, Set<BundleRevision>>emptyMap());
        resolver.resolve(Collections.<String>emptySet(),
                         FeaturesService.DEFAULT_FEATURE_RESOLUTION_RANGE,
View Full Code Here


        addToMapSet(expected, "root/apps1#f1", "d/1.0.0");
        addToMapSet(expected, "root/apps2", "b/1.0.0");
        addToMapSet(expected, "root/apps2", "c/1.0.0");
        addToMapSet(expected, "root/apps2#f1", "a/1.0.0");

        SubsystemResolver resolver = new SubsystemResolver(new TestDownloadManager(getClass(), "data2"));
        resolver.prepare(Arrays.asList(repo.getFeatures()),
                         features,
                         Collections.<String, Set<BundleRevision>>emptyMap());
        resolver.resolve(Collections.<String>emptySet(),
                         FeaturesService.DEFAULT_FEATURE_RESOLUTION_RANGE,
View Full Code Here

        addToMapSet(features, "root/apps1", "f1");

        Map<String, Set<String>> expected = new HashMap<String, Set<String>>();
        addToMapSet(expected, "root/apps1", "a/1.0.1");

        SubsystemResolver resolver = new SubsystemResolver(new TestDownloadManager(getClass(), "data3"));
        resolver.prepare(Arrays.asList(repo.getFeatures()),
                         features,
                         Collections.<String, Set<BundleRevision>>emptyMap());
        resolver.resolve(Collections.singleton("b"),
                         FeaturesService.DEFAULT_FEATURE_RESOLUTION_RANGE,
View Full Code Here

        Map<String, Set<String>> features = new HashMap<String, Set<String>>();
        addToMapSet(features, "root/apps1", "f1");
        Map<String, Set<String>> expected = new HashMap<String, Set<String>>();
        addToMapSet(expected, "root/apps1", "a/1.0.0");

        SubsystemResolver resolver = new SubsystemResolver(new TestDownloadManager(getClass(), "data4"));
        resolver.prepare(Arrays.asList(repo.getFeatures()),
                         features,
                         Collections.<String, Set<BundleRevision>>emptyMap());
        resolver.resolve(Collections.<String>emptySet(),
                         FeaturesService.DEFAULT_FEATURE_RESOLUTION_RANGE,
View Full Code Here

        addToMapSet(features, "root/apps1", "f2");
        Map<String, Set<String>> expected = new HashMap<String, Set<String>>();
        addToMapSet(expected, "root/apps1", "a/1.0.0");
        addToMapSet(expected, "root/apps1", "b/1.0.0");

        SubsystemResolver resolver = new SubsystemResolver(new TestDownloadManager(getClass(), "data4"));
        resolver.prepare(Arrays.asList(repo.getFeatures()),
                         features,
                         Collections.<String, Set<BundleRevision>>emptyMap());
        resolver.resolve(Collections.<String>emptySet(),
                         FeaturesService.DEFAULT_FEATURE_RESOLUTION_RANGE,
View Full Code Here

        addToMapSet(features, "root/apps1", "bundle:c;dependency=true");
        Map<String, Set<String>> expected = new HashMap<String, Set<String>>();
        addToMapSet(expected, "root/apps1", "a/1.0.0");
        addToMapSet(expected, "root/apps1", "c/1.0.0");

        SubsystemResolver resolver = new SubsystemResolver(new TestDownloadManager(getClass(), "data1"));
        resolver.prepare(Arrays.asList(repo.getFeatures()),
                features,
                Collections.<String, Set<BundleRevision>>emptyMap());
        resolver.resolve(Collections.<String>emptySet(),
                FeaturesService.DEFAULT_FEATURE_RESOLUTION_RANGE,
View Full Code Here

        addToMapSet(features, "root", "f1");
        Map<String, Set<String>> expected = new HashMap<String, Set<String>>();
        addToMapSet(expected, "root", "a/1.0.0");
        addToMapSet(expected, "root", "b/1.0.0");

        SubsystemResolver resolver = new SubsystemResolver(new TestDownloadManager(getClass(), "data5"));
        resolver.prepare(Arrays.asList(repo.getFeatures()),
                features,
                Collections.<String, Set<BundleRevision>>emptyMap());
        resolver.resolve(Collections.<String>emptySet(),
                FeaturesService.DEFAULT_FEATURE_RESOLUTION_RANGE,
View Full Code Here

        addToMapSet(features, "root", "f3");
        Map<String, Set<String>> expected = new HashMap<String, Set<String>>();
        addToMapSet(expected, "root", "a/1.0.0");
        addToMapSet(expected, "root", "c/1.0.0");

        SubsystemResolver resolver = new SubsystemResolver(new TestDownloadManager(getClass(), "data5"));
        resolver.prepare(Arrays.asList(repo.getFeatures()),
                features,
                Collections.<String, Set<BundleRevision>>emptyMap());
        resolver.resolve(Collections.<String>emptySet(),
                FeaturesService.DEFAULT_FEATURE_RESOLUTION_RANGE,
View Full Code Here

    @Test
    public void testInstallSimpleFeature() throws Exception {

        String dataDir = "data1";

        TestDownloadManager manager = new TestDownloadManager(getClass(), dataDir);

        RepositoryImpl repo = new RepositoryImpl(getClass().getResource(dataDir + "/features.xml").toURI());
        repo.load(true);
        Feature f100 = repo.getFeatures()[0];
        Feature f101 = repo.getFeatures()[1];
View Full Code Here

    @Test
    public void testUpdateSimpleFeature() throws Exception {

        final String dataDir = "data1";

        TestDownloadManager manager = new TestDownloadManager(getClass(), dataDir);

        RepositoryImpl repo = new RepositoryImpl(getClass().getResource(dataDir + "/features.xml").toURI());
        repo.load(true);
        Feature f100 = repo.getFeatures()[0];
        Feature f101 = repo.getFeatures()[1];
View Full Code Here

TOP

Related Classes of org.apache.karaf.features.internal.support.TestDownloadManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.