org.apache.commons.configuration
Class TestEnvironmentConfiguration

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

public class TestEnvironmentConfiguration
extends junit.framework.TestCase

Test class for EnvironmentConfiguration.

Version:
$Id: TestEnvironmentConfiguration.java 587636 2007-10-23 20:03:47Z oheger $
Author:
Oliver Heger

Constructor Summary
TestEnvironmentConfiguration()
           
 
Method Summary
protected  void setUp()
           
 void testAddProperty()
          Tries to add another property.
 void testClear()
          Tests removing all properties.
 void testClearProperty()
          Tests removing properties.
 void testExtractProperties14()
          Tests extracting properties for JDK before 1.5.
 void testExtractPropertiesFromCollection()
          Tests whether a collection with properties is correctly processed.
 void testInit()
          Tests whether a newly created configuration contains some properties.
 void testSetProperty()
          Tries to set the value of a property.
 
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
 

Constructor Detail

TestEnvironmentConfiguration

public TestEnvironmentConfiguration()
Method Detail

setUp

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

testInit

public void testInit()
Tests whether a newly created configuration contains some properties. (We expect that at least some properties are set in each environment.)


testExtractProperties14

public void testExtractProperties14()
Tests extracting properties for JDK before 1.5. This method should work on later JDKs, too, so we can test it always.


testExtractPropertiesFromCollection

public void testExtractPropertiesFromCollection()
Tests whether a collection with properties is correctly processed.


testClearProperty

public void testClearProperty()
Tests removing properties. This should not be possible.


testClear

public void testClear()
Tests removing all properties. This should not be possible.


testAddProperty

public void testAddProperty()
Tries to add another property. This should cause an exception.


testSetProperty

public void testSetProperty()
Tries to set the value of a property. This should cause an exception.



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