Examples of MockConfigurationManager


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

    protected void setUp() throws Exception {
        super.setUp();
        Artifact id = new Artifact("test", "test", "", "car");
        module  = new ConnectorModule(false, new AbstractName(id, Collections.singletonMap("name", "test")), null, null, "foo", null, null, null, null);
        ConfigurationManager configurationManager = new MockConfigurationManager();
        EARContext earContext = new EARContext(new File("foo"),
            null,
            new Environment(new Artifact("foo", "bar", "1.0", "car")),
            ConfigurationModuleType.EAR,
            naming,
View Full Code Here

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

        LoginConfigBuilder builder = new LoginConfigBuilder(new Jsr77Naming(), null);
        XmlObject xmlObject = XmlBeansUtil.parse(text);
        XmlCursor cursor = xmlObject.newCursor();
        cursor.toFirstContentToken();
        xmlObject = cursor.getObject();
        DeploymentContext context = new DeploymentContext(new File("."), null, new Environment(Artifact.create("test/foo/1.0/car")), null, ConfigurationModuleType.SERVICE, new Jsr77Naming(), new MockConfigurationManager(), Collections.emptySet());
        AbstractName parentName = new AbstractName(URI.create("test/foo/1.0/car?name=parent,j2eeType=foo"));
        builder.getReferences(xmlObject, context, parentName, getClass().getClassLoader());
        secBuilder.doStop();
    }
View Full Code Here

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

        if (!repoBase.exists()) {
            throw new RuntimeException("Could not locate repo :" + repoBase);
        }
        Maven2Repository repo = new Maven2Repository(repoBase.toURI(), serverInfo, true);
        configStore = new RepositoryConfigurationStore(repo);
        installer = new PluginInstallerGBean(new MockConfigurationManager(),
                repo,
                configStore,
                serverInfo,
                new ThreadPool() {
            public int getPoolSize() {
View Full Code Here

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

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

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

        LoginConfigBuilder builder = new LoginConfigBuilder(new Jsr77Naming(), null);
        XmlObject xmlObject = XmlBeansUtil.parse(text);
        XmlCursor cursor = xmlObject.newCursor();
        cursor.toFirstContentToken();
        xmlObject = cursor.getObject();
        DeploymentContext context = new DeploymentContext(new File("."), null, new Environment(Artifact.create("test/foo/1.0/car")), null, ConfigurationModuleType.SERVICE, new Jsr77Naming(), new MockConfigurationManager(), Collections.emptySet());
        AbstractName parentName = new AbstractName(URI.create("test/foo/1.0/car?name=parent,j2eeType=foo"));
        builder.getReferences(xmlObject, context, parentName, getClass().getClassLoader());
        secBuilder.doStop();
    }
View Full Code Here

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

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

        DeploymentContext.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());
        ClassPathList classPathList = new ClassPathList();
        context.getCompleteManifestClassPath(start, start.getRelativeURI(), resolutionURI, classPathList, exclusions, factory, new ArrayList<DeploymentException>());
        assertEquals(2, classPathList.size());
    }
View Full Code Here

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

        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");

        DeploymentContext.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());
        ClassPathList classPathList = new ClassPathList();
        context.getCompleteManifestClassPath(start, start.getRelativeURI(), resolutionURI, classPathList, exclusions, factory, new ArrayList<DeploymentException>());
        assertEquals(4, classPathList.size());
        assertEquals("lib1/lib1/lib1.jar", classPathList.get(0));
        assertEquals("lib2/lib2.jar", classPathList.get(1));
View Full Code Here

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

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

        DeploymentContext.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());
        ClassPathList classPathList = new ClassPathList();
        context.getCompleteManifestClassPath(start, start.getRelativeURI(), resolutionURI, classPathList, exclusions, factory, new ArrayList<DeploymentException>());
        assertEquals(2, classPathList.size());
        assertEquals("../lib1.jar", classPathList.get(0));
        assertEquals("../lib2.jar", classPathList.get(1));
View Full Code Here

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

        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");

        DeploymentContext.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());
        ClassPathList classPathList = new ClassPathList();
        context.getCompleteManifestClassPath(start, start.getRelativeURI(), resolutionURI, classPathList, exclusions, factory, new ArrayList<DeploymentException>());
        assertEquals(4, classPathList.size());
        assertEquals("../../../lib1/lib1/lib1.jar", classPathList.get(0));
        assertEquals("../../../lib2/lib2/lib2.jar", classPathList.get(1));
View Full Code Here

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

        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");

        DeploymentContext.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());
        ClassPathList classPathList = new ClassPathList();
        context.getCompleteManifestClassPath(start, start.getRelativeURI(), resolutionURI, classPathList, exclusions, factory, new ArrayList<DeploymentException>());
        assertEquals(4, classPathList.size());
        assertEquals("../../../lib1/lib1/lib1.jar", classPathList.get(0));
        assertEquals("../../../lib2/lib2.jar", classPathList.get(1));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.