Package org.apache.geronimo.kernel.mock

Examples of org.apache.geronimo.kernel.mock.MockConfigurationManager


        fakeRepo = "http://nowhere.com/";
        String url = getClass().getResource("/geronimo-plugins.xml").toString();
        int pos = url.lastIndexOf("/");
        testRepo = url.substring(0, pos);
        ServerInfo serverInfo = new BasicServerInfo(".");
        installer = new PluginInstallerGBean(new MockConfigurationManager(), new MockWritableListableRepository(), new MockConfigStore(),
                installedPluginsList, serverInfo, new ThreadPool() {
            public int getPoolSize() {
                return 0;
            }
View Full Code Here


        cursor.toFirstContentToken();
        xmlObject = cursor.getObject();
        HashMap<String, Artifact> locations = new HashMap<String, Artifact>();
        locations.put(null, Artifact.create("test/foo/1.0/car"));
        BundleContext bundleContext = new MockBundleContext(getClass().getClassLoader(), "", new HashMap<Artifact, ConfigurationData>(), locations);
        DeploymentContext context = new DeploymentContext(new File("."), null, new Environment(Artifact.create("test/foo/1.0/car")), null, ConfigurationModuleType.SERVICE, new Jsr77Naming(), new MockConfigurationManager(), Collections.<Repository>emptySet(), bundleContext);
        context.initializeConfiguration();
        AbstractName parentName = new AbstractName(URI.create("test/foo/1.0/car?name=parent,j2eeType=foo"));
        builder.getReferences(xmlObject, context, parentName, bundleContext.getBundle());
        secBuilder.doStop();
    }
View Full Code Here

        Map<String, Artifact> locations = new HashMap<String, Artifact>();
        locations.put(null, artifact);
        BundleContext bundleContext = new MockBundleContext(getClass().getClassLoader(), "", null, locations);
        Artifact id = new Artifact("test", "test", "", "car");
        module  = new ConnectorModule(false, new AbstractName(id, Collections.singletonMap("name", "test")), null, null, null, "foo", null, null, null, null, null);
        ConfigurationManager configurationManager = new MockConfigurationManager();
        EARContext earContext = new EARContext(new File("foo"),
            null,
            new Environment(artifact),
            ConfigurationModuleType.EAR,
            new Jsr77Naming(),
View Full Code Here

    protected Module parentModule;

    protected void setUp() throws Exception {
        super.setUp();
        bundleContext = new MockBundleContext(getClass().getClassLoader(), "", new HashMap<Artifact, ConfigurationData>(), locations);
        ((MockBundleContext)bundleContext).setConfigurationManager(new MockConfigurationManager());
        bundleContext.registerService(DependencyManager.class.getName(), new MockDependencyManager(bundleContext, Collections.<Repository> emptyList(), null), new Hashtable());
        Set<Artifact> repo = new HashSet<Artifact>();
        repo.add(Artifact.create("org.apache.geronimo.tests/test/1/car"));
        repository = new MockRepository(repo);
        defaultParentId = new Environment();
View Full Code Here

        LinkedHashSet<String> exclusions = new LinkedHashSet<String>();
        Map<URI, String> data = new HashMap<URI, String>();
        data.put(URI.create("lib1.jar"), "lib1.jar lib2.jar");

        ClassPathUtils.JarFileFactory factory = new MockJarFileFactory(data);
        DeploymentContext context = new DeploymentContext(new File("."), null, new Environment(Artifact.create("test/foo/1/ear")), new AbstractName(URI.create("test/foo/1/ear?name=test")), ConfigurationModuleType.EAR, new Jsr77Naming(), new MockConfigurationManager(), bundleContext);
        ArrayList<String> classPathList = new ArrayList<String>();
        ClassPathUtils.getCompleteManifestClassPath(start, start.getRelativeURI(), resolutionURI, classPathList, exclusions, factory);
        assertEquals(2, classPathList.size());
    }
View Full Code Here

        data.put(URI.create("lib1/lib1/lib1.jar"), "../../lib2/lib2.jar");
        data.put(URI.create("lib2/lib2.jar"), "lib2a.jar");
        data.put(URI.create("lib2/lib2a.jar"), "../lib3.jar ../lib1/lib1/lib1.jar");

        ClassPathUtils.JarFileFactory factory = new MockJarFileFactory(data);
        DeploymentContext context = new DeploymentContext(new File("."), null, new Environment(Artifact.create("test/foo/1/ear")), new AbstractName(URI.create("test/foo/1/ear?name=test")), ConfigurationModuleType.EAR, new Jsr77Naming(), new MockConfigurationManager(), bundleContext);
        ArrayList<String> classPathList = new ArrayList<String>();
        ClassPathUtils.getCompleteManifestClassPath(start, start.getRelativeURI(), resolutionURI, classPathList, exclusions, factory);
        assertEquals(4, classPathList.size());
        assertEquals("lib1/lib1/lib1.jar", classPathList.get(0));
        assertEquals("lib2/lib2.jar", classPathList.get(1));
View Full Code Here

        data.put(URI.create("lib2/lib2a.jar"), "../lib3.jar ../lib1/lib1/lib1.jar");
        data.put(URI.create("libfolder/a.jar"), "");
        data.put(URI.create("libfolder/b.jar"), "");

        ClassPathUtils.JarFileFactory factory = new MockJarFileFactory(data);
        DeploymentContext context = new DeploymentContext(new File("."), null, new Environment(Artifact.create("test/foo/1/ear")), new AbstractName(URI.create("test/foo/1/ear?name=test")), ConfigurationModuleType.EAR, new Jsr77Naming(), new MockConfigurationManager(), bundleContext);
        ArrayList<String> classPathList = new ArrayList<String>();
        ClassPathUtils.getCompleteManifestClassPath(start, start.getRelativeURI(), resolutionURI, classPathList, exclusions, factory);
        assertEquals(7, classPathList.size());
        assertEquals("lib1/lib1/lib1.jar", classPathList.get(0));
        assertEquals("lib2/lib2.jar", classPathList.get(1));
View Full Code Here

        LinkedHashSet<String> exclusions = new LinkedHashSet<String>();
        Map<URI, String> data = new HashMap<URI, String>();
        data.put(URI.create("lib1.jar"), "lib1.jar lib2.jar");

        ClassPathUtils.JarFileFactory factory = new MockJarFileFactory(data);
        DeploymentContext context = new DeploymentContext(new File("."), null, new Environment(Artifact.create("test/foo/1/ear")), new AbstractName(URI.create("test/foo/1/ear?name=test")), ConfigurationModuleType.EAR, new Jsr77Naming(), new MockConfigurationManager(), bundleContext);
        ArrayList<String> classPathList = new ArrayList<String>();
        ClassPathUtils.getCompleteManifestClassPath(start, start.getRelativeURI(), resolutionURI, classPathList, exclusions, factory);
        assertEquals(2, classPathList.size());
        assertEquals("../lib1.jar", classPathList.get(0));
        assertEquals("../lib2.jar", classPathList.get(1));
View Full Code Here

        data.put(URI.create("lib1/lib1/lib1.jar"), "../../lib2/lib2/lib2.jar");
        data.put(URI.create("lib2/lib2/lib2.jar"), "../lib2a/lib2a.jar");
        data.put(URI.create("lib2/lib2a/lib2a.jar"), "../../lib3/lib3/lib3.jar ../../lib1/lib1/lib1.jar");

        ClassPathUtils.JarFileFactory factory = new MockJarFileFactory(data);
        DeploymentContext context = new DeploymentContext(new File("."), null, new Environment(Artifact.create("test/foo/1/ear")), new AbstractName(URI.create("test/foo/1/ear?name=test")), ConfigurationModuleType.EAR, new Jsr77Naming(), new MockConfigurationManager(), bundleContext);
        ArrayList<String> classPathList = new ArrayList<String>();
        ClassPathUtils.getCompleteManifestClassPath(start, start.getRelativeURI(), resolutionURI, classPathList, exclusions, factory);
        assertEquals(4, classPathList.size());
        assertEquals("../../../lib1/lib1/lib1.jar", classPathList.get(0));
        assertEquals("../../../lib2/lib2/lib2.jar", classPathList.get(1));
View Full Code Here

        data.put(URI.create("lib1/lib1/lib1.jar"), "../../lib2/lib2.jar");
        data.put(URI.create("lib2/lib2.jar"), "lib2a.jar");
        data.put(URI.create("lib2/lib2a.jar"), "../lib3.jar ../lib1/lib1/lib1.jar");

        ClassPathUtils.JarFileFactory factory = new MockJarFileFactory(data);
        DeploymentContext context = new DeploymentContext(new File("."), null, new Environment(Artifact.create("test/foo/1/ear")), new AbstractName(URI.create("test/foo/1/ear?name=test")), ConfigurationModuleType.EAR, new Jsr77Naming(), new MockConfigurationManager(), bundleContext);
        ArrayList<String> classPathList = new ArrayList<String>();
        ClassPathUtils.getCompleteManifestClassPath(start, start.getRelativeURI(), resolutionURI, classPathList, exclusions, factory);
        assertEquals(4, classPathList.size());
        assertEquals("../../../lib1/lib1/lib1.jar", classPathList.get(0));
        assertEquals("../../../lib2/lib2.jar", classPathList.get(1));
View Full Code Here

TOP

Related Classes of org.apache.geronimo.kernel.mock.MockConfigurationManager

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.