Package org.objectweb.celtix.bus.configuration

Examples of org.objectweb.celtix.bus.configuration.TopConfigurationBuilder


    public void testCustomEditorRegistration() {
       
        URL url = CeltixXmlBeanFactoryTest.class.getResource("resources/top2.xml");
        UrlResource urlRes = new UrlResource(url);
        CeltixXmlBeanFactory bf = new CeltixXmlBeanFactory(urlRes);
        Configuration top = new TopConfigurationBuilder().build("top22");
       
        Map map = bf.getCustomEditors();
       
        // no editor for complex types registered yet
       
View Full Code Here


    }

    public void testInvalidBeanDefinitionsResourceURL() {
        System.setProperty(ConfigurationProviderImpl.CONFIG_FILE_PROPERTY_NAME, "resources\top1.xml");
        try {
            new TopConfigurationBuilder().build("top");
        } catch (ConfigurationException ex) {
            assertEquals("MALFORMED_URL_PROPERTY", ex.getCode());
        }
    }
View Full Code Here

            assertEquals("MALFORMED_URL_PROPERTY", ex.getCode());
        }
    }

    public void testNoBeanDefinitionsFile() {
        Configuration top = new TopConfigurationBuilder().build("top");
        List<ConfigurationProvider> providers = top.getProviders();
        assertEquals(1, providers.size());
        assertTrue(providers.get(0) instanceof ConfigurationProviderImpl);
        ConfigurationProviderImpl cpi = (ConfigurationProviderImpl)providers.get(0);
        assertNull(cpi.getBean());
View Full Code Here

    }

    public void testInvalidBeanDefinitionFile() {
        URL url = ConfigurationProviderImplTest.class.getResource("resources/top-invalid.xml");
        System.setProperty(ConfigurationProviderImpl.CONFIG_FILE_PROPERTY_NAME, url.toExternalForm());
        new TopConfigurationBuilder().build("top");
        assertNull(ConfigurationProviderImpl.getBeanFactories().get(url));
    }
View Full Code Here

        System.setProperty(ConfigurationProviderImpl.CONFIG_FILE_PROPERTY_NAME, url.toExternalForm());

        // The non-existing class is detected when the bean factory is initialised - not
        // later when the bean is created.

        new TopConfigurationBuilder().build("top");
        assertNull(ConfigurationProviderImpl.getBeanFactories().get(url));
    }
View Full Code Here

    public void testNoSuchBean() {

        URL url = ConfigurationProviderImplTest.class.getResource("resources/top1.xml");
        System.setProperty(ConfigurationProviderImpl.CONFIG_FILE_PROPERTY_NAME, url.toExternalForm());

        Configuration top = new TopConfigurationBuilder().build("top2");

        List<ConfigurationProvider> providers = top.getProviders();
        assertEquals(1, providers.size());

        ConfigurationProviderImpl cpi = (ConfigurationProviderImpl)providers.get(0);
View Full Code Here

    public void testDefaultBeanCreation() throws MalformedURLException {
        URL url = ConfigurationProviderImplTest.class.getResource("resources/top1.xml");
        System.setProperty(ConfigurationProviderImpl.CONFIG_FILE_PROPERTY_NAME, url.toExternalForm());

        Configuration top = new TopConfigurationBuilder().build("top1");
        List<ConfigurationProvider> providers = top.getProviders();
        assertEquals(1, providers.size());
        assertTrue(providers.get(0) instanceof ConfigurationProviderImpl);
    }
View Full Code Here

    }

    public void testBeanCreationUsingValueAsText() throws MalformedURLException {
        URL url = ConfigurationProviderImplTest.class.getResource("resources/top2.xml");
        System.setProperty(ConfigurationProviderImpl.CONFIG_FILE_PROPERTY_NAME, url.toExternalForm());
        Configuration top = new TopConfigurationBuilder().build("top2");

        List<ConfigurationProvider> providers = top.getProviders();
        assertEquals(1, providers.size());
        assertTrue(providers.get(0) instanceof ConfigurationProviderImpl);
View Full Code Here

    }

    public void testBeanCreationUsingValueAsElements() throws MalformedURLException {
        URL url = ConfigurationProviderImplTest.class.getResource("resources/top2.xml");
        System.setProperty(ConfigurationProviderImpl.CONFIG_FILE_PROPERTY_NAME, url.toExternalForm());
        Configuration top = new TopConfigurationBuilder().build("top22");

        List<ConfigurationProvider> providers = top.getProviders();
        assertEquals(1, providers.size());
        assertTrue(providers.get(0) instanceof ConfigurationProviderImpl);
View Full Code Here

    public void testBeanCreationSimpleHierarchy() {
        URL url = ConfigurationProviderImplTest.class.getResource("resources/top2.xml");
        System.setProperty(ConfigurationProviderImpl.CONFIG_FILE_PROPERTY_NAME, url.toExternalForm());

        Configuration top = new TopConfigurationBuilder().build("top2");
        Configuration leaf = new LeafConfigurationBuilder().build(top, "leaf");

        List<ConfigurationProvider> providers = leaf.getProviders();
        assertEquals(1, providers.size());
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.bus.configuration.TopConfigurationBuilder

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.