Package org.objectweb.celtix.configuration

Examples of org.objectweb.celtix.configuration.Configuration


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


        Object o = providers.get(0).getObject("stringLeafItem");
        assertTrue(o instanceof String);
View Full Code Here


    public void testPropertyEditorConversionFailure() throws InvocationTargetException,
        NoSuchMethodException, IllegalAccessException {
        URL url = CustomPropertyEditorsTest.class.getResource("resources/top3.xml");
        UrlResource urlRes = new UrlResource(url);
        CeltixXmlBeanFactory bf = new CeltixXmlBeanFactory(urlRes);
        Configuration top = new TopConfigurationBuilder().build("top3");
        bf.registerCustomEditors(top);
        Configuration leaf = new LeafConfigurationBuilder().build(top, "leaf");
        bf.registerCustomEditors(leaf);
     
        // the first form results in a BeanCreationException (caused by a
        // PropertyAccessExceptionsException)
       
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.configuration.Configuration

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.