org.apache.commons.configuration.tree
Class TestDefaultConfigurationKey

java.lang.Object
  extended by org.apache.commons.configuration.tree.TestDefaultConfigurationKey

public class TestDefaultConfigurationKey
extends Object

Test class for DefaultConfigurationKey.

Version:
$Id: TestDefaultConfigurationKey.java 1225914 2011-12-30 20:26:36Z oheger $
Author:
Oliver Heger

Constructor Summary
TestDefaultConfigurationKey()
           
 
Method Summary
 void setUp()
           
 void testAppend()
          Tests appending keys.
 void testAppendAttribute()
          Tests appending attribute keys.
 void testAppendComplexKey()
          Tests constructing a complex key by chaining multiple append operations.
 void testAppendDecoratedAttributeKey()
          Tests appending an attribute key that is already decorated-
 void testAppendDelimiters()
          Tests appending keys that contain delimiters.
 void testAppendDelimitersWithoutEscaping()
          Tests appending keys that contain delimiters when no escpaped delimiter is defined.
 void testAppendIndex()
          Tests appending an index to a key.
 void testAppendNullAttributeKey()
          Tests appending a null attribute key.
 void testAppendWithEscapeFlag()
          Tests calling append with the escape flag.
 void testAttributeKeyWithIndex()
          Tests iterating over an attribute key that has an index.
 void testAttributeName()
          Tests determining an attribute key's name.
 void testConstructAttributeKey()
          Tests constructing keys for attributes.
 void testConstructAttributeKeyWithoutEndMarkers()
          Tests constructing attribute keys when no end markers are defined.
 void testEquals()
          Tests comparing configuration keys.
 void testIsAttributeKey()
          Tests the isAttributeKey() method with several keys.
 void testIsAttributeKeyWithoutEndMarkers()
          Tests if attribute keys are correctly detected if no end markers are set.
 void testIterate()
          Tests to iterate over a simple key.
 void testIterateAlternativeEscapeDelimiter()
          Tests iterating over keys when a different escaped delimiter is used.
 void testIterateAttributeEqualsPropertyDelimiter()
          Tests iteration when the attribute markers equals the property delimiter.
 void testIterateEscapedDelimiters()
          Tests iterating over keys with escaped delimiters.
 void testIterateStrangeKeys()
          Tests iterating over some funny keys.
 void testIterateWithBrackets()
          Tests whether a key with brackets in it can be iterated over.
 void testIterateWithoutEscapeDelimiter()
          Tests iterating when no escape delimiter is defined.
 void testIterateWithRemove()
          Tests an iteration where the remove() method is called.
 void testLength()
          Tests getting and setting the key's length.
 void testSetNullExpressionEngine()
          Tests setting the expression engine to null.
 void testTrim()
          Tests removing delimiters.
 void testTrimLeft()
          Tests removing leading delimiters.
 void testTrimRight()
          Tests removing trailing delimiters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestDefaultConfigurationKey

public TestDefaultConfigurationKey()
Method Detail

setUp

public void setUp()
           throws Exception
Throws:
Exception

testSetNullExpressionEngine

public void testSetNullExpressionEngine()
Tests setting the expression engine to null. This should not be allowed.


testIsAttributeKey

public void testIsAttributeKey()
Tests the isAttributeKey() method with several keys.


testIsAttributeKeyWithoutEndMarkers

public void testIsAttributeKeyWithoutEndMarkers()
Tests if attribute keys are correctly detected if no end markers are set. (In this test case we use the same delimiter for attributes as for simple properties.)


testTrimLeft

public void testTrimLeft()
Tests removing leading delimiters.


testTrimRight

public void testTrimRight()
Tests removing trailing delimiters.


testTrim

public void testTrim()
Tests removing delimiters.


testAppend

public void testAppend()
Tests appending keys.


testAppendDelimiters

public void testAppendDelimiters()
Tests appending keys that contain delimiters.


testAppendDelimitersWithoutEscaping

public void testAppendDelimitersWithoutEscaping()
Tests appending keys that contain delimiters when no escpaped delimiter is defined.


testAppendWithEscapeFlag

public void testAppendWithEscapeFlag()
Tests calling append with the escape flag.


testConstructAttributeKey

public void testConstructAttributeKey()
Tests constructing keys for attributes.


testConstructAttributeKeyWithoutEndMarkers

public void testConstructAttributeKeyWithoutEndMarkers()
Tests constructing attribute keys when no end markers are defined. In this test case we use the property delimiter as attribute prefix.


testAppendAttribute

public void testAppendAttribute()
Tests appending attribute keys.


testAppendDecoratedAttributeKey

public void testAppendDecoratedAttributeKey()
Tests appending an attribute key that is already decorated-


testAppendNullAttributeKey

public void testAppendNullAttributeKey()
Tests appending a null attribute key.


testAppendIndex

public void testAppendIndex()
Tests appending an index to a key.


testAppendComplexKey

public void testAppendComplexKey()
Tests constructing a complex key by chaining multiple append operations.


testLength

public void testLength()
Tests getting and setting the key's length.


testEquals

public void testEquals()
Tests comparing configuration keys.


testAttributeName

public void testAttributeName()
Tests determining an attribute key's name.


testIterate

public void testIterate()
Tests to iterate over a simple key.


testIterateWithRemove

public void testIterateWithRemove()
Tests an iteration where the remove() method is called. This is not supported.


testIterateStrangeKeys

public void testIterateStrangeKeys()
Tests iterating over some funny keys.


testIterateEscapedDelimiters

public void testIterateEscapedDelimiters()
Tests iterating over keys with escaped delimiters.


testIterateAlternativeEscapeDelimiter

public void testIterateAlternativeEscapeDelimiter()
Tests iterating over keys when a different escaped delimiter is used.


testIterateWithoutEscapeDelimiter

public void testIterateWithoutEscapeDelimiter()
Tests iterating when no escape delimiter is defined.


testIterateWithBrackets

public void testIterateWithBrackets()
Tests whether a key with brackets in it can be iterated over.


testAttributeKeyWithIndex

public void testAttributeKeyWithIndex()
Tests iterating over an attribute key that has an index.


testIterateAttributeEqualsPropertyDelimiter

public void testIterateAttributeEqualsPropertyDelimiter()
Tests iteration when the attribute markers equals the property delimiter.



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