org.apache.commons.configuration
Class TestJNDIConfiguration

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

public class TestJNDIConfiguration
extends Object

Test to see if the JNDIConfiguration works properly.

Version:
$Id: TestJNDIConfiguration.java 1301996 2012-03-17 20:30:39Z sebb $

Nested Class Summary
static class TestJNDIConfiguration.PotentialErrorJNDIConfiguration
          A special JNDI configuration implementation that can be configured to throw an exception when accessing the base context.
 
Field Summary
static String CONTEXT_FACTORY
           
 
Constructor Summary
TestJNDIConfiguration()
           
 
Method Summary
 void setUp()
           
 void tearDown()
          Clears the test environment.
 void testBoolean()
           
 void testBooleanDefaultValue()
           
 void testByte()
           
 void testChangePrefix()
           
 void testConstructor()
           
 void testContainsKey()
           
 void testContainsKeyError()
          Tests handling of errors in the containsKey() method.
 void testDouble()
           
 void testDoubleDefaultValue()
           
 void testFloat()
           
 void testFloatDefaultValue()
           
 void testGetKeysError()
          Tests handling of errors in getKeys().
 void testGetKeysNoData()
          Tests getKeys() if no data is found.
 void testGetKeysWithCycles()
          Tests the getKeys() method when there are cycles in the tree.
 void testGetPropertyError()
          Tests handling of errors in getProperty().
 void testInteger()
           
 void testIntegerDefaultValue()
           
 void testIsEmptyError()
          Tests handling of errors in isEmpty().
 void testListMissing()
           
 void testLogListener()
          Tests whether a JNDI configuration registers an error log listener.
 void testLong()
           
 void testLongDefaultValue()
           
 void testProperties()
           
 void testResetRemovedProperties()
           
 void testShort()
           
 void testShortDefaultValue()
           
 void testSubset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTEXT_FACTORY

public static final String CONTEXT_FACTORY
Constructor Detail

TestJNDIConfiguration

public TestJNDIConfiguration()
Method Detail

setUp

public void setUp()
           throws Exception
Throws:
Exception

tearDown

public void tearDown()
              throws Exception
Clears the test environment. If an error listener is defined, checks whether no error event was received.

Throws:
Exception

testBoolean

public void testBoolean()
                 throws Exception
Throws:
Exception

testBooleanDefaultValue

public void testBooleanDefaultValue()
                             throws Exception
Throws:
Exception

testByte

public void testByte()
              throws Exception
Throws:
Exception

testDouble

public void testDouble()
                throws Exception
Throws:
Exception

testDoubleDefaultValue

public void testDoubleDefaultValue()
                            throws Exception
Throws:
Exception

testFloat

public void testFloat()
               throws Exception
Throws:
Exception

testFloatDefaultValue

public void testFloatDefaultValue()
                           throws Exception
Throws:
Exception

testInteger

public void testInteger()
                 throws Exception
Throws:
Exception

testIntegerDefaultValue

public void testIntegerDefaultValue()
                             throws Exception
Throws:
Exception

testLong

public void testLong()
              throws Exception
Throws:
Exception

testLongDefaultValue

public void testLongDefaultValue()
                          throws Exception
Throws:
Exception

testShort

public void testShort()
               throws Exception
Throws:
Exception

testShortDefaultValue

public void testShortDefaultValue()
                           throws Exception
Throws:
Exception

testListMissing

public void testListMissing()
                     throws Exception
Throws:
Exception

testSubset

public void testSubset()
                throws Exception
Throws:
Exception

testProperties

public void testProperties()
                    throws Exception
Throws:
Exception

testContainsKey

public void testContainsKey()

testChangePrefix

public void testChangePrefix()

testResetRemovedProperties

public void testResetRemovedProperties()
                                throws Exception
Throws:
Exception

testConstructor

public void testConstructor()
                     throws Exception
Throws:
Exception

testLogListener

public void testLogListener()
                     throws NamingException
Tests whether a JNDI configuration registers an error log listener.

Throws:
NamingException

testGetKeysError

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


testIsEmptyError

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

Throws:
Exception

testContainsKeyError

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


testGetPropertyError

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


testGetKeysWithCycles

public void testGetKeysWithCycles()
                           throws NamingException
Tests the getKeys() method when there are cycles in the tree.

Throws:
NamingException

testGetKeysNoData

public void testGetKeysNoData()
Tests getKeys() if no data is found. This should not cause a problem and not notify the error listeners.



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