org.apache.commons.configuration
Class TestPropertyConverter

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

public class TestPropertyConverter
extends Object

Test class for PropertyConverter.

Version:
$Id: TestPropertyConverter.java 1301990 2012-03-17 20:10:46Z oheger $
Author:
Emmanuel Bourg

Constructor Summary
TestPropertyConverter()
           
 
Method Summary
 void testCyclicInterpolation()
          Tests an interpolation that leads to a cycle.
 void testEscapeDelimiters()
          Tests whether delimiters are correctly escaped.
 void testEscapeListDelimiter()
          Tests whether only the list delimiter can be escaped.
 void testInterpolateObject()
          Tests interpolation of an object.
 void testInterpolateRecursive()
          Tests complex interpolation where the variables' values contain in turn other variables.
 void testInterpolateString()
          Tests the interpolation features.
 void testInterpolationUnknownVariable()
          Tests interpolation if a variable is unknown.
 void testSplit()
           
 void testSplitEmptyValues()
           
 void testSplitEscapeEscapeChar()
          Tests whether an escape character can be itself escaped.
 void testSplitNoTrim()
           
 void testSplitNull()
           
 void testSplitWithEndingSlash()
           
 void testSplitWithEscapedSeparator()
           
 void testToEnumFromEnum()
           
 void testToEnumFromInvalidNumber()
           
 void testToEnumFromInvalidString()
           
 void testToEnumFromNumber()
           
 void testToEnumFromString()
           
 void testToIterator()
           
 void testToNoConversionNeeded()
          Tests a trivial conversion: the value has already the desired type.
 void testToNumberDirect()
          Tests conversion to numbers when the passed in objects are already numbers.
 void testToNumberFromBinaryString()
          Tests conversion to numbers when the passed in objects are strings with prefixes for special radices.
 void testToNumberFromHexString()
          Tests conversion to numbers when the passed in objects are strings with prefixes for special radices.
 void testToNumberFromInvalidBinaryString()
          Tests conversion to numbers when an invalid binary value is passed in.
 void testToNumberFromInvalidHexString()
          Tests conversion to numbers when an invalid Hex value is passed in.
 void testToNumberFromInvalidString()
          Tests conversion to numbers when the passed in objects have no numeric String representation.
 void testToNumberFromString()
          Tests conversion to numbers when the passed in objects have a compatible string representation.
 void testToNumberWithInvalidClass()
          Tests conversion to numbers when the passed in target class is invalid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestPropertyConverter

public TestPropertyConverter()
Method Detail

testSplit

public void testSplit()

testSplitNoTrim

public void testSplitNoTrim()

testSplitWithEscapedSeparator

public void testSplitWithEscapedSeparator()

testSplitEmptyValues

public void testSplitEmptyValues()

testSplitWithEndingSlash

public void testSplitWithEndingSlash()

testSplitNull

public void testSplitNull()

testSplitEscapeEscapeChar

public void testSplitEscapeEscapeChar()
Tests whether an escape character can be itself escaped.


testEscapeDelimiters

public void testEscapeDelimiters()
Tests whether delimiters are correctly escaped.


testEscapeListDelimiter

public void testEscapeListDelimiter()
Tests whether only the list delimiter can be escaped.


testToIterator

public void testToIterator()

testInterpolateString

public void testInterpolateString()
Tests the interpolation features.


testInterpolateObject

public void testInterpolateObject()
Tests interpolation of an object. Here nothing should be substituted.


testInterpolateRecursive

public void testInterpolateRecursive()
Tests complex interpolation where the variables' values contain in turn other variables.


testCyclicInterpolation

public void testCyclicInterpolation()
Tests an interpolation that leads to a cycle. This should throw an exception.


testInterpolationUnknownVariable

public void testInterpolationUnknownVariable()
Tests interpolation if a variable is unknown. Then the variable won't be substituted.


testToNumberDirect

public void testToNumberDirect()
Tests conversion to numbers when the passed in objects are already numbers.


testToNumberFromString

public void testToNumberFromString()
Tests conversion to numbers when the passed in objects have a compatible string representation.


testToNumberFromHexString

public void testToNumberFromHexString()
Tests conversion to numbers when the passed in objects are strings with prefixes for special radices.


testToNumberFromInvalidHexString

public void testToNumberFromInvalidHexString()
Tests conversion to numbers when an invalid Hex value is passed in. This should cause an exception.


testToNumberFromBinaryString

public void testToNumberFromBinaryString()
Tests conversion to numbers when the passed in objects are strings with prefixes for special radices.


testToNumberFromInvalidBinaryString

public void testToNumberFromInvalidBinaryString()
Tests conversion to numbers when an invalid binary value is passed in. This should cause an exception.


testToNumberFromInvalidString

public void testToNumberFromInvalidString()
Tests conversion to numbers when the passed in objects have no numeric String representation. This should cause an exception.


testToNumberWithInvalidClass

public void testToNumberWithInvalidClass()
Tests conversion to numbers when the passed in target class is invalid. This should cause an exception.


testToEnumFromEnum

public void testToEnumFromEnum()

testToEnumFromString

public void testToEnumFromString()

testToEnumFromInvalidString

public void testToEnumFromInvalidString()

testToEnumFromNumber

public void testToEnumFromNumber()

testToEnumFromInvalidNumber

public void testToEnumFromInvalidNumber()

testToNoConversionNeeded

public void testToNoConversionNeeded()
Tests a trivial conversion: the value has already the desired type.



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