org.apache.commons.configuration.tree
Class TestMergeCombiner

java.lang.Object
  extended by org.apache.commons.configuration.tree.AbstractCombinerTest
      extended by org.apache.commons.configuration.tree.TestMergeCombiner

public class TestMergeCombiner
extends AbstractCombinerTest

Test class for MergeCombiner.

Version:
$Id: TestMergeCombiner.java 1225911 2011-12-30 20:19:10Z oheger $

Field Summary
 
Fields inherited from class org.apache.commons.configuration.tree.AbstractCombinerTest
combiner
 
Constructor Summary
TestMergeCombiner()
           
 
Method Summary
protected  NodeCombiner createCombiner()
          Creates the combiner.
 void testAttributes()
          Tests combination of attributes.
 void testCombinedTable()
          Tests the combination of the table structure.
 void testListFromFirstStructure()
          Tests if a list from the first node structure overrides a list in the second structure.
 void testListFromSecondStructure()
          Tests if a list from the second structure is added if it is not defined in the first structure.
 void testMerge()
           
 void testOverrideValues()
          Tests whether property values are correctly overridden.
 void testSimpleValues()
          Tests combination of simple elements.
 
Methods inherited from class org.apache.commons.configuration.tree.AbstractCombinerTest
createCombinedConfiguration, setUp, testInit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestMergeCombiner

public TestMergeCombiner()
Method Detail

createCombiner

protected NodeCombiner createCombiner()
Creates the combiner.

Specified by:
createCombiner in class AbstractCombinerTest
Returns:
the combiner

testSimpleValues

public void testSimpleValues()
                      throws ConfigurationException
Tests combination of simple elements.

Throws:
ConfigurationException

testAttributes

public void testAttributes()
                    throws ConfigurationException
Tests combination of attributes.

Throws:
ConfigurationException

testOverrideValues

public void testOverrideValues()
                        throws ConfigurationException
Tests whether property values are correctly overridden.

Throws:
ConfigurationException

testListFromFirstStructure

public void testListFromFirstStructure()
                                throws ConfigurationException
Tests if a list from the first node structure overrides a list in the second structure.

Throws:
ConfigurationException

testListFromSecondStructure

public void testListFromSecondStructure()
                                 throws ConfigurationException
Tests if a list from the second structure is added if it is not defined in the first structure.

Throws:
ConfigurationException

testCombinedTable

public void testCombinedTable()
                       throws ConfigurationException
Tests the combination of the table structure. With the merge combiner both table 1 and table 2 should be present.

Throws:
ConfigurationException

testMerge

public void testMerge()
               throws ConfigurationException
Throws:
ConfigurationException


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