org.apache.commons.configuration
Class TestNullCompositeConfiguration

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

public class TestNullCompositeConfiguration
extends Object

Test loading multiple configurations.

Version:
$Id: TestNullCompositeConfiguration.java 1224814 2011-12-26 21:15:53Z oheger $

Field Summary
protected  CompositeConfiguration cc
           
protected  PropertiesConfiguration conf1
           
protected  PropertiesConfiguration conf2
           
protected  XMLConfiguration xmlConf
           
 
Constructor Summary
TestNullCompositeConfiguration()
           
 
Method Summary
 void setUp()
           
 void testAddingProperty()
          Tests adding values.
 void testAddRemoveConfigurations()
           
 void testCantRemoveMemoryConfig()
           
 void testCheckingInMemoryConfiguration()
           
 void testClearingProperty()
          Tests setting values.
 void testDefaultValueWhenKeyMissing()
          Tests getting a default when the key doesn't exist
 void testGetKeys2PreservesOrder()
          Tests getKeys(String key) preserves the order
 void testGetKeysPreservesOrder()
          Tests getKeys() preserves the order
 void testGetList()
           
 void testGetProperty()
           
 void testGetPropertyMissing()
           
 void testGetPropertyWIncludes()
           
 void testGetStringWithDefaults()
           
 void testGettingConfiguration()
           
 void testGettingSubset()
          Tests retrieving subsets of configurations
 void testGetVector()
           
 void testList()
          Tests List parsing.
 void testMultipleTypesOfConfigs()
           
 void testPropertyExistsInOnlyOneConfig()
           
 void testSettingMissingProperty()
          Tests setting values.
 void testStringArray()
          Tests String array parsing.
 void testSubsetCanResolve()
          Tests subsets and still can resolve elements
 void testThrowExceptionOnMissing()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

conf1

protected PropertiesConfiguration conf1

conf2

protected PropertiesConfiguration conf2

xmlConf

protected XMLConfiguration xmlConf

cc

protected CompositeConfiguration cc
Constructor Detail

TestNullCompositeConfiguration

public TestNullCompositeConfiguration()
Method Detail

setUp

public void setUp()
           throws Exception
Throws:
Exception

testThrowExceptionOnMissing

public void testThrowExceptionOnMissing()

testAddRemoveConfigurations

public void testAddRemoveConfigurations()
                                 throws Exception
Throws:
Exception

testGetPropertyWIncludes

public void testGetPropertyWIncludes()
                              throws Exception
Throws:
Exception

testGetProperty

public void testGetProperty()
                     throws Exception
Throws:
Exception

testCantRemoveMemoryConfig

public void testCantRemoveMemoryConfig()
                                throws Exception
Throws:
Exception

testGetPropertyMissing

public void testGetPropertyMissing()
                            throws Exception
Throws:
Exception

testMultipleTypesOfConfigs

public void testMultipleTypesOfConfigs()
                                throws Exception
Throws:
Exception

testPropertyExistsInOnlyOneConfig

public void testPropertyExistsInOnlyOneConfig()
                                       throws Exception
Throws:
Exception

testDefaultValueWhenKeyMissing

public void testDefaultValueWhenKeyMissing()
                                    throws Exception
Tests getting a default when the key doesn't exist

Throws:
Exception

testGettingConfiguration

public void testGettingConfiguration()
                              throws Exception
Throws:
Exception

testClearingProperty

public void testClearingProperty()
                          throws Exception
Tests setting values. These are set in memory mode only!

Throws:
Exception

testAddingProperty

public void testAddingProperty()
                        throws Exception
Tests adding values. Make sure they _DON'T_ override any other properties but add to the existing properties and keep sequence

Throws:
Exception

testSettingMissingProperty

public void testSettingMissingProperty()
                                throws Exception
Tests setting values. These are set in memory mode only!

Throws:
Exception

testGettingSubset

public void testGettingSubset()
                       throws Exception
Tests retrieving subsets of configurations

Throws:
Exception

testSubsetCanResolve

public void testSubsetCanResolve()
                          throws Exception
Tests subsets and still can resolve elements

Throws:
Exception

testList

public void testList()
              throws Exception
Tests List parsing.

Throws:
Exception

testStringArray

public void testStringArray()
                     throws Exception
Tests String array parsing.

Throws:
Exception

testGetList

public void testGetList()

testGetVector

public void testGetVector()

testGetKeysPreservesOrder

public void testGetKeysPreservesOrder()
                               throws Exception
Tests getKeys() preserves the order

Throws:
Exception

testGetKeys2PreservesOrder

public void testGetKeys2PreservesOrder()
                                throws Exception
Tests getKeys(String key) preserves the order

Throws:
Exception

testGetStringWithDefaults

public void testGetStringWithDefaults()

testCheckingInMemoryConfiguration

public void testCheckingInMemoryConfiguration()
                                       throws Exception
Throws:
Exception


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