commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r447537 - /jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/beanutils/TestConfigurationDynaBean.java
Date Mon, 18 Sep 2006 20:16:03 GMT
Author: oheger
Date: Mon Sep 18 13:16:03 2006
New Revision: 447537

URL: http://svn.apache.org/viewvc?view=rev&rev=447537
Log:
Updated test for ConfigurationDynaBean so that it can easily be subclassed to test different
configuration types

Modified:
    jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/beanutils/TestConfigurationDynaBean.java

Modified: jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/beanutils/TestConfigurationDynaBean.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/beanutils/TestConfigurationDynaBean.java?view=diff&rev=447537&r1=447536&r2=447537
==============================================================================
--- jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/beanutils/TestConfigurationDynaBean.java
(original)
+++ jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/beanutils/TestConfigurationDynaBean.java
Mon Sep 18 13:16:03 2006
@@ -97,7 +97,7 @@
      */
     public void setUp() throws Exception
     {
-        Configuration configuration = new BaseConfiguration();
+        Configuration configuration = createConfiguration();
 
         for (int i = 0; i < properties.length; i++)
         {
@@ -135,6 +135,14 @@
         bean.set("stringArray", stringArray);
     }
 
+    /**
+     * Creates the underlying configuration object for the dyna bean.
+     * @return the underlying configuration object
+     */
+    protected Configuration createConfiguration()
+    {
+        return new BaseConfiguration();
+    }
 
     /**
      * Corner cases on getDynaProperty invalid arguments.
@@ -362,7 +370,7 @@
     {
         try
         {
-            bean.get(null);
+            bean.get("a non existing property");
         }
         catch (IllegalArgumentException e)
         {



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message