org.apache.commons.configuration
Class TestBaseConfiguration

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

public class TestBaseConfiguration
extends Object

Tests some basic functions of the BaseConfiguration class. Missing keys will throw Exceptions

Version:
$Id: TestBaseConfiguration.java 1231721 2012-01-15 18:32:07Z oheger $

Field Summary
protected  BaseConfiguration config
           
protected static Class<?> incompatibleElementException
           
protected static Class<?> missingElementException
           
 
Constructor Summary
TestBaseConfiguration()
           
 
Method Summary
 void setUp()
           
 void testAddProperty()
           
 void testClone()
          Tests cloning a BaseConfiguration.
 void testCloneListProperty()
          Tests the clone() method if a list property is involved.
 void testCloneModify()
          Tests whether a cloned configuration is decoupled from its original.
 void testCommaSeparatedString()
           
 void testCommaSeparatedStringEscaped()
           
 void testGetBigDecimal()
           
 void testGetBigDecimalIncompatibleType()
           
 void testGetBigDecimalUnknown()
           
 void testGetBigInteger()
           
 void testGetBigIntegerIncompatibleType()
           
 void testGetBigIntegerUnknown()
           
 void testGetBinaryValue()
           
 void testGetBoolean()
           
 void testGetBooleanIncompatibleType()
           
 void testGetBooleanUnknown()
           
 void testGetByte()
           
 void testGetByteIncompatibleType()
           
 void testGetByteUnknown()
           
 void testGetDouble()
           
 void testGetDoubleIncompatibleType()
           
 void testGetDoubleUnknown()
           
 void testGetFloat()
           
 void testGetFloatIncompatibleType()
           
 void testGetFloatUnknown()
           
 void testGetHexadecimalValue()
           
 void testGetInterpolatedList()
           
 void testGetInterpolatedPrimitives()
           
 void testGetInterpolator()
          Tests accessing and manipulating the interpolator object.
 void testGetList()
           
 void testGetLong()
           
 void testGetLongIncompatibleTypes()
           
 void testGetLongUnknown()
           
 void testGetProperty()
           
 void testGetShort()
           
 void testGetShortIncompatibleType()
           
 void testGetShortUnknown()
           
 void testGetString()
           
 void testGetStringForListValue()
          Tests that the first scalar of a list is returned.
 void testGetStringUnknown()
           
 void testInterpolatedConfiguration()
          Tests obtaining a configuration with all variables replaced by their actual values.
 void testInterpolation()
           
 void testInterpolationConstants()
          Tests interpolation of constant values.
 void testInterpolationEscaped()
          Tests whether a variable can be escaped, so that it won't be interpolated.
 void testInterpolationLoop()
           
 void testInterpolationSubset()
          Tests interpolation when a subset configuration is involved.
 void testInterpolationSystemProperties()
          Tests interpolation of system properties.
 void testInterpolationUnknownProperty()
          Tests interpolation when the referred property is not found.
 void testMultipleInterpolation()
           
 void testNumberConversions()
          Tests if conversion between number types is possible.
 void testPropertyAccess()
           
 void testResolveContainerStore()
           
 void testSubset()
           
 void testThrowExceptionOnMissing()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

config

protected BaseConfiguration config

missingElementException

protected static Class<?> missingElementException

incompatibleElementException

protected static Class<?> incompatibleElementException
Constructor Detail

TestBaseConfiguration

public TestBaseConfiguration()
Method Detail

setUp

public void setUp()
           throws Exception
Throws:
Exception

testThrowExceptionOnMissing

public void testThrowExceptionOnMissing()

testGetProperty

public void testGetProperty()

testGetByte

public void testGetByte()

testGetByteUnknown

public void testGetByteUnknown()

testGetByteIncompatibleType

public void testGetByteIncompatibleType()

testGetShort

public void testGetShort()

testGetShortUnknown

public void testGetShortUnknown()

testGetShortIncompatibleType

public void testGetShortIncompatibleType()

testGetLong

public void testGetLong()

testGetLongUnknown

public void testGetLongUnknown()

testGetLongIncompatibleTypes

public void testGetLongIncompatibleTypes()

testGetFloat

public void testGetFloat()

testGetFloatUnknown

public void testGetFloatUnknown()

testGetFloatIncompatibleType

public void testGetFloatIncompatibleType()

testGetDouble

public void testGetDouble()

testGetDoubleUnknown

public void testGetDoubleUnknown()

testGetDoubleIncompatibleType

public void testGetDoubleIncompatibleType()

testGetBigDecimal

public void testGetBigDecimal()

testGetBigDecimalUnknown

public void testGetBigDecimalUnknown()

testGetBigDecimalIncompatibleType

public void testGetBigDecimalIncompatibleType()

testGetBigInteger

public void testGetBigInteger()

testGetBigIntegerUnknown

public void testGetBigIntegerUnknown()

testGetBigIntegerIncompatibleType

public void testGetBigIntegerIncompatibleType()

testGetString

public void testGetString()

testGetStringUnknown

public void testGetStringUnknown()

testGetBoolean

public void testGetBoolean()

testGetBooleanUnknown

public void testGetBooleanUnknown()

testGetBooleanIncompatibleType

public void testGetBooleanIncompatibleType()

testGetList

public void testGetList()

testGetStringForListValue

public void testGetStringForListValue()
Tests that the first scalar of a list is returned.


testGetInterpolatedList

public void testGetInterpolatedList()

testGetInterpolatedPrimitives

public void testGetInterpolatedPrimitives()

testCommaSeparatedString

public void testCommaSeparatedString()

testCommaSeparatedStringEscaped

public void testCommaSeparatedStringEscaped()

testAddProperty

public void testAddProperty()
                     throws Exception
Throws:
Exception

testPropertyAccess

public void testPropertyAccess()

testSubset

public void testSubset()

testInterpolation

public void testInterpolation()

testMultipleInterpolation

public void testMultipleInterpolation()

testInterpolationLoop

public void testInterpolationLoop()

testInterpolationSubset

public void testInterpolationSubset()
Tests interpolation when a subset configuration is involved.


testInterpolationUnknownProperty

public void testInterpolationUnknownProperty()
Tests interpolation when the referred property is not found.


testInterpolationSystemProperties

public void testInterpolationSystemProperties()
Tests interpolation of system properties.


testInterpolationConstants

public void testInterpolationConstants()
Tests interpolation of constant values.


testInterpolationEscaped

public void testInterpolationEscaped()
Tests whether a variable can be escaped, so that it won't be interpolated.


testGetInterpolator

public void testGetInterpolator()
Tests accessing and manipulating the interpolator object.


testInterpolatedConfiguration

public void testInterpolatedConfiguration()
Tests obtaining a configuration with all variables replaced by their actual values.


testGetHexadecimalValue

public void testGetHexadecimalValue()

testGetBinaryValue

public void testGetBinaryValue()

testResolveContainerStore

public void testResolveContainerStore()

testNumberConversions

public void testNumberConversions()
Tests if conversion between number types is possible.


testClone

public void testClone()
Tests cloning a BaseConfiguration.


testCloneModify

public void testCloneModify()
Tests whether a cloned configuration is decoupled from its original.


testCloneListProperty

public void testCloneListProperty()
Tests the clone() method if a list property is involved.



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