commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r820426 - /commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestDatabaseConfiguration.java
Date Wed, 30 Sep 2009 19:58:54 GMT
Author: oheger
Date: Wed Sep 30 19:58:54 2009
New Revision: 820426

URL: http://svn.apache.org/viewvc?rev=820426&view=rev
Log:
[CONFIGURATION-398] Added a unit test for DatabaseConfiguration.setProperty() with a list
of properties.

Modified:
    commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestDatabaseConfiguration.java

Modified: commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestDatabaseConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestDatabaseConfiguration.java?rev=820426&r1=820425&r2=820426&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestDatabaseConfiguration.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestDatabaseConfiguration.java
Wed Sep 30 19:58:54 2009
@@ -419,6 +419,19 @@
     }
 
     /**
+     * Tests setProperty() if the property value contains the list delimiter.
+     */
+    public void testSetPropertyWithDelimiter()
+    {
+        DatabaseConfiguration config = setUpMultiConfig();
+        config.setListDelimiter(';');
+        config.setProperty("keyList", "1;2;3");
+        String[] values = config.getStringArray("keyList");
+        assertEquals("Wrong number of property values", 3, values.length);
+        assertEquals("Wrong value at index 1", "2", values[1]);
+    }
+
+    /**
      * Test instantiating a DatabaseConfiguration from a configuration descriptor.
      */
     public void testConfigurationBuilder() throws Exception



Mime
View raw message