org.apache.commons.configuration.tree
Class AbstractCombinerTest

java.lang.Object
  extended by org.apache.commons.configuration.tree.AbstractCombinerTest
Direct Known Subclasses:
TestMergeCombiner, TestOverrideCombiner, TestUnionCombiner

public abstract class AbstractCombinerTest
extends Object

A base class for testing combiner implementations. This base class provides some functionality for loading the test configurations, which are to be combined. Concrete sub classes only need to create the correct combiner object.

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

Field Summary
protected  NodeCombiner combiner
          The combiner to be tested.
 
Constructor Summary
AbstractCombinerTest()
           
 
Method Summary
protected  HierarchicalConfiguration createCombinedConfiguration()
          Constructs a union configuration based on the source configurations.
protected abstract  NodeCombiner createCombiner()
          Creates the combiner to be tested.
 void setUp()
           
 void testInit()
          Tests a newly created combiner.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

combiner

protected NodeCombiner combiner
The combiner to be tested.

Constructor Detail

AbstractCombinerTest

public AbstractCombinerTest()
Method Detail

setUp

public void setUp()
           throws Exception
Throws:
Exception

createCombiner

protected abstract NodeCombiner createCombiner()
Creates the combiner to be tested. This method is called by setUp(). It must be implemented in concrete sub classes.

Returns:
the combiner to be tested

createCombinedConfiguration

protected HierarchicalConfiguration createCombinedConfiguration()
                                                         throws ConfigurationException
Constructs a union configuration based on the source configurations.

Returns:
the union configuration
Throws:
ConfigurationException - if an error occurs

testInit

public void testInit()
Tests a newly created combiner.



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