org.apache.commons.configuration
Class TestDatabaseConfiguration

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

public class TestDatabaseConfiguration
extends Object

Test for database stored configurations. Note, when running this Unit Test in Eclipse it sometimes takes a couple tries. Otherwise you may get database is already in use by another process errors.

Version:
$Id: TestDatabaseConfiguration.java 1223016 2011-12-24 20:56:52Z oheger $

Constructor Summary
TestDatabaseConfiguration()
           
 
Method Summary
 void setUp()
           
 void tearDown()
           
 void testAddNonStringProperty()
           
 void testAddPropertyDirectCommit()
          Tests whether a commit is performed after a property was added.
 void testAddPropertyDirectMultiple()
           
 void testAddPropertyDirectSingle()
           
 void testAddPropertyError()
          Tests handling of errors in addPropertyDirect().
 void testAddWithDelimiter()
          Tests adding a property containing the list delimiter.
 void testClearCommit()
          Tests whether a commit is performed after a clear operation.
 void testClearError()
          Tests handling of errors in clear().
 void testClearMultiple()
           
 void testClearPropertyCommit()
          Tests whether a commit is performed after a property was cleared.
 void testClearPropertyError()
          Tests handling of errors in clearProperty().
 void testClearPropertyMultiple()
           
 void testClearPropertyMultipleOtherConfig()
          Tests that another configuration is not affected when clearing properties.
 void testClearPropertySingle()
           
 void testClearSingle()
           
 void testClearSubset()
           
 void testContainsKeyError()
          Tests handling of errors in containsKey().
 void testContainsKeyMultiple()
           
 void testContainsKeySingle()
           
 void testDoCommitsDefault()
          Tests the default value of the doCommits property.
 void testDoCommitsDefaultMulti()
          Tests the default value of the doCommits property for multiple configurations in a table.
 void testGetKeys()
           
 void testGetKeysError()
          Tests handling of errors in getKeys().
 void testGetKeysMultiple()
           
 void testGetKeysSingle()
           
 void testGetList()
           
 void testGetListWithDelimiter()
          Tests obtaining a property as list whose value contains the list delimiter.
 void testGetListWithDelimiterParsingDisabled()
          Tests obtaining a property whose value contains the list delimiter when delimiter parsing is disabled.
 void testGetPropertyDirectMultiple()
           
 void testGetPropertyDirectSingle()
           
 void testGetPropertyError()
          Tests handling of errors in getProperty().
 void testIsEmptyError()
          Tests handling of errors in isEmpty().
 void testIsEmptyMultiple()
           
 void testIsEmptySingle()
           
 void testLogErrorListener()
          Tests whether the configuration has already an error listener registered that is used for logging.
 void testSetPropertyWithDelimiter()
          Tests setProperty() if the property value contains the list delimiter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestDatabaseConfiguration

public TestDatabaseConfiguration()
Method Detail

setUp

public void setUp()
           throws Exception
Throws:
Exception

tearDown

public void tearDown()
              throws Exception
Throws:
Exception

testDoCommitsDefault

public void testDoCommitsDefault()
Tests the default value of the doCommits property.


testDoCommitsDefaultMulti

public void testDoCommitsDefaultMulti()
Tests the default value of the doCommits property for multiple configurations in a table.


testAddPropertyDirectSingle

public void testAddPropertyDirectSingle()

testAddPropertyDirectCommit

public void testAddPropertyDirectCommit()
Tests whether a commit is performed after a property was added.


testAddPropertyDirectMultiple

public void testAddPropertyDirectMultiple()

testAddNonStringProperty

public void testAddNonStringProperty()

testGetPropertyDirectSingle

public void testGetPropertyDirectSingle()

testGetPropertyDirectMultiple

public void testGetPropertyDirectMultiple()

testClearPropertySingle

public void testClearPropertySingle()

testClearPropertyMultiple

public void testClearPropertyMultiple()

testClearPropertyMultipleOtherConfig

public void testClearPropertyMultipleOtherConfig()
Tests that another configuration is not affected when clearing properties.


testClearPropertyCommit

public void testClearPropertyCommit()
Tests whether a commit is performed after a property was cleared.


testClearSingle

public void testClearSingle()

testClearMultiple

public void testClearMultiple()

testClearCommit

public void testClearCommit()
Tests whether a commit is performed after a clear operation.


testGetKeysSingle

public void testGetKeysSingle()

testGetKeysMultiple

public void testGetKeysMultiple()

testContainsKeySingle

public void testContainsKeySingle()

testContainsKeyMultiple

public void testContainsKeyMultiple()

testIsEmptySingle

public void testIsEmptySingle()

testIsEmptyMultiple

public void testIsEmptyMultiple()

testGetList

public void testGetList()

testGetKeys

public void testGetKeys()

testClearSubset

public void testClearSubset()

testLogErrorListener

public void testLogErrorListener()
Tests whether the configuration has already an error listener registered that is used for logging.


testGetPropertyError

public void testGetPropertyError()
Tests handling of errors in getProperty().


testAddPropertyError

public void testAddPropertyError()
Tests handling of errors in addPropertyDirect().


testIsEmptyError

public void testIsEmptyError()
Tests handling of errors in isEmpty().


testContainsKeyError

public void testContainsKeyError()
Tests handling of errors in containsKey().


testClearPropertyError

public void testClearPropertyError()
Tests handling of errors in clearProperty().


testClearError

public void testClearError()
Tests handling of errors in clear().


testGetKeysError

public void testGetKeysError()
Tests handling of errors in getKeys().


testGetListWithDelimiter

public void testGetListWithDelimiter()
Tests obtaining a property as list whose value contains the list delimiter. Multiple values should be returned.


testGetListWithDelimiterParsingDisabled

public void testGetListWithDelimiterParsingDisabled()
Tests obtaining a property whose value contains the list delimiter when delimiter parsing is disabled.


testAddWithDelimiter

public void testAddWithDelimiter()
Tests adding a property containing the list delimiter. When this property is queried multiple values should be returned.


testSetPropertyWithDelimiter

public void testSetPropertyWithDelimiter()
Tests setProperty() if the property value contains the list delimiter.



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