Package org.apache.commons.configuration2

Examples of org.apache.commons.configuration2.BaseHierarchicalConfiguration.clearProperty()


        assertEquals("Wrong value of at attribute", "test1", decl.getAt());
        config.addProperty("xml[@at]", "test2");
        decl = createDeclaration(config.configurationAt("xml"));
        assertEquals("Wrong value of config-at attribute", "test1",
                decl.getAt());
        config.clearProperty("xml[@config-at]");
        decl = createDeclaration(config.configurationAt("xml"));
        assertEquals("Old at attribute not detected", "test2", decl.getAt());
        config.addProperty("xml[@config-optional]", "true");
        decl = createDeclaration(config.configurationAt("xml"));
        assertTrue("Wrong value of optional attribute", decl.isOptional());
View Full Code Here


        assertTrue("Wrong value of optional attribute", decl.isOptional());
        config.addProperty("xml[@optional]", "false");
        decl = createDeclaration(config.configurationAt("xml"));
        assertTrue("Wrong value of config-optional attribute",
                decl.isOptional());
        config.clearProperty("xml[@config-optional]");
        config.setProperty("xml[@optional]", Boolean.TRUE);
        decl = createDeclaration(config.configurationAt("xml"));
        assertTrue("Old optional attribute not detected", decl.isOptional());
    }
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.