org.apache.commons.configuration
Class TestHierarchicalXMLConfiguration

java.lang.Object
  extended by org.apache.commons.configuration.TestHierarchicalXMLConfiguration

public class TestHierarchicalXMLConfiguration
extends Object

Test class for XMLConfiguration. In addition to TestXMLConfiguration this class especially tests the hierarchical nature of this class and structured data access.

Version:
$Id: TestHierarchicalXMLConfiguration.java 1224764 2011-12-26 17:14:49Z oheger $
Author:
Emmanuel Bourg, Mark Woodman

Field Summary
 org.junit.rules.TemporaryFolder folder
          Helper object for creating temporary files.
 
Constructor Summary
TestHierarchicalXMLConfiguration()
           
 
Method Summary
 void setUp()
          Fixture setup.
 void testGetProperty()
           
 void testLoadBasePath1()
           
 void testLoadBasePath2()
           
 void testLoadURL()
           
 void testRootElement()
          Tests manipulation of the root element's name.
 void testSave()
           
 void testSaveModified()
          Tests to save a modified configuration.
 void testSaveNew()
          Tests to save a newly created configuration.
 void testSetRootElementNameWhenLoadedFromFile()
          Tests that it is not allowed to change the root element name when the configuration was loaded from a file.
 void testXmlNodeTypes()
          Ensure various node types are correctly processed in config.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

folder

public org.junit.rules.TemporaryFolder folder
Helper object for creating temporary files.

Constructor Detail

TestHierarchicalXMLConfiguration

public TestHierarchicalXMLConfiguration()
Method Detail

setUp

public void setUp()
           throws Exception
Fixture setup.

Throws:
Exception

testGetProperty

public void testGetProperty()
                     throws Exception
Throws:
Exception

testLoadURL

public void testLoadURL()
                 throws Exception
Throws:
Exception

testLoadBasePath1

public void testLoadBasePath1()
                       throws Exception
Throws:
Exception

testLoadBasePath2

public void testLoadBasePath2()
                       throws Exception
Throws:
Exception

testXmlNodeTypes

public void testXmlNodeTypes()
                      throws Exception
Ensure various node types are correctly processed in config.

Throws:
Exception

testSave

public void testSave()
              throws Exception
Throws:
Exception

testSaveNew

public void testSaveNew()
                 throws Exception
Tests to save a newly created configuration.

Throws:
Exception

testSaveModified

public void testSaveModified()
                      throws Exception
Tests to save a modified configuration.

Throws:
Exception

testRootElement

public void testRootElement()
                     throws Exception
Tests manipulation of the root element's name.

Throws:
Exception

testSetRootElementNameWhenLoadedFromFile

public void testSetRootElementNameWhenLoadedFromFile()
                                              throws Exception
Tests that it is not allowed to change the root element name when the configuration was loaded from a file.

Throws:
Exception


Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.