org.apache.commons.configuration
Class TestJNDIConfiguration

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.configuration.TestJNDIConfiguration
All Implemented Interfaces:
junit.framework.Test

public class TestJNDIConfiguration
extends junit.framework.TestCase

Test to see if the JNDIConfiguration works properly.

Version:
$Id: TestJNDIConfiguration.java 558330 2007-07-21 15:26:19Z oheger $

Field Summary
static java.lang.String CONTEXT_FACTORY
           
 
Constructor Summary
TestJNDIConfiguration()
           
 
Method Summary
 void setUp()
           
protected  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 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 junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONTEXT_FACTORY

public static final java.lang.String CONTEXT_FACTORY
Constructor Detail

TestJNDIConfiguration

public TestJNDIConfiguration()
Method Detail

setUp

public void setUp()
           throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

tearDown

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

Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

testBoolean

public void testBoolean()
                 throws java.lang.Exception
Throws:
java.lang.Exception

testBooleanDefaultValue

public void testBooleanDefaultValue()
                             throws java.lang.Exception
Throws:
java.lang.Exception

testByte

public void testByte()
              throws java.lang.Exception
Throws:
java.lang.Exception

testDouble

public void testDouble()
                throws java.lang.Exception
Throws:
java.lang.Exception

testDoubleDefaultValue

public void testDoubleDefaultValue()
                            throws java.lang.Exception
Throws:
java.lang.Exception

testFloat

public void testFloat()
               throws java.lang.Exception
Throws:
java.lang.Exception

testFloatDefaultValue

public void testFloatDefaultValue()
                           throws java.lang.Exception
Throws:
java.lang.Exception

testInteger

public void testInteger()
                 throws java.lang.Exception
Throws:
java.lang.Exception

testIntegerDefaultValue

public void testIntegerDefaultValue()
                             throws java.lang.Exception
Throws:
java.lang.Exception

testLong

public void testLong()
              throws java.lang.Exception
Throws:
java.lang.Exception

testLongDefaultValue

public void testLongDefaultValue()
                          throws java.lang.Exception
Throws:
java.lang.Exception

testShort

public void testShort()
               throws java.lang.Exception
Throws:
java.lang.Exception

testShortDefaultValue

public void testShortDefaultValue()
                           throws java.lang.Exception
Throws:
java.lang.Exception

testListMissing

public void testListMissing()
                     throws java.lang.Exception
Throws:
java.lang.Exception

testSubset

public void testSubset()
                throws java.lang.Exception
Throws:
java.lang.Exception

testProperties

public void testProperties()
                    throws java.lang.Exception
Throws:
java.lang.Exception

testContainsKey

public void testContainsKey()

testChangePrefix

public void testChangePrefix()

testResetRemovedProperties

public void testResetRemovedProperties()
                                throws java.lang.Exception
Throws:
java.lang.Exception

testConstructor

public void testConstructor()
                     throws java.lang.Exception
Throws:
java.lang.Exception

testLogListener

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

Throws:
javax.naming.NamingException

testGetKeysError

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


testIsEmptyError

public void testIsEmptyError()
                      throws javax.naming.NamingException
Tests handling of errors in isEmpty().

Throws:
javax.naming.NamingException

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 javax.naming.NamingException
Tests the getKeys() method when there are cycles in the tree.

Throws:
javax.naming.NamingException


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