org.apache.commons.configuration
Class TestBaseConfiguration

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

public class TestBaseConfiguration
extends junit.framework.TestCase

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

Version:
$Id: TestBaseConfiguration.java 588335 2007-10-25 20:22:35Z oheger $

Field Summary
protected  org.apache.commons.configuration.BaseConfiguration config
           
protected static java.lang.Class incompatibleElementException
           
protected static java.lang.Class missingElementException
           
 
Constructor Summary
TestBaseConfiguration()
           
 
Method Summary
protected  void setUp()
           
 void testAddProperty()
           
 void testClone()
          Tests cloning a BaseConfiguration.
 void testCloneModify()
          Tests whether a cloned configuration is decoupled from its original.
 void testCommaSeparatedString()
           
 void testGetBigDecimal()
           
 void testGetBigInteger()
           
 void testGetBoolean()
           
 void testGetByte()
           
 void testGetDouble()
           
 void testGetFloat()
           
 void testGetHexadecimalValue()
           
 void testGetInterpolatedList()
           
 void testGetInterpolatedPrimitives()
           
 void testGetInterpolator()
          Tests accessing and manipulating the interpolator object.
 void testGetList()
           
 void testGetLong()
           
 void testGetProperty()
           
 void testGetShort()
           
 void testGetString()
           
 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 junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, 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

config

protected org.apache.commons.configuration.BaseConfiguration config

missingElementException

protected static java.lang.Class missingElementException

incompatibleElementException

protected static java.lang.Class incompatibleElementException
Constructor Detail

TestBaseConfiguration

public TestBaseConfiguration()
Method Detail

setUp

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

testThrowExceptionOnMissing

public void testThrowExceptionOnMissing()

testGetProperty

public void testGetProperty()

testGetByte

public void testGetByte()

testGetShort

public void testGetShort()

testGetLong

public void testGetLong()

testGetFloat

public void testGetFloat()

testGetDouble

public void testGetDouble()

testGetBigDecimal

public void testGetBigDecimal()

testGetBigInteger

public void testGetBigInteger()

testGetString

public void testGetString()

testGetBoolean

public void testGetBoolean()

testGetList

public void testGetList()

testGetInterpolatedList

public void testGetInterpolatedList()

testGetInterpolatedPrimitives

public void testGetInterpolatedPrimitives()

testCommaSeparatedString

public void testCommaSeparatedString()

testAddProperty

public void testAddProperty()
                     throws java.lang.Exception
Throws:
java.lang.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()

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.



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