commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1460450 - /commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestEqualBehaviour.java
Date Sun, 24 Mar 2013 20:21:19 GMT
Author: oheger
Date: Sun Mar 24 20:21:19 2013
New Revision: 1460450

URL: http://svn.apache.org/r1460450
Log:
[CONFIGURATION-537] Removed reference to ConfigurationFactory from test class.

Modified:
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestEqualBehaviour.java

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestEqualBehaviour.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestEqualBehaviour.java?rev=1460450&r1=1460449&r2=1460450&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestEqualBehaviour.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestEqualBehaviour.java
Sun Mar 24 20:21:19 2013
@@ -24,6 +24,8 @@ import static org.junit.Assert.assertTru
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.commons.configuration.builder.FileBasedBuilderParametersImpl;
+import org.apache.commons.configuration.builder.combined.CombinedConfigurationBuilder;
 import org.apache.commons.configuration.io.FileHandler;
 import org.junit.Test;
 
@@ -46,15 +48,15 @@ public class TestEqualBehaviour
         return c;
     }
 
-    @SuppressWarnings("deprecation")
     private Configuration setupCompositeConfiguration()
-            throws Exception
+            throws ConfigurationException
     {
-        String compositeConfigurationFile = ConfigurationAssert.getTestFile("testEqualDigester.xml").getAbsolutePath();
-
-        ConfigurationFactory configurationFactory = new ConfigurationFactory();
-        configurationFactory.setConfigurationFileName(compositeConfigurationFile);
-        return configurationFactory.getConfiguration();
+        CombinedConfigurationBuilder builder =
+                new CombinedConfigurationBuilder();
+        builder.configure(new FileBasedBuilderParametersImpl()
+                .setFile(ConfigurationAssert
+                        .getTestFile("testEqualDigester.xml")));
+        return builder.getConfiguration();
     }
 
     /**



Mime
View raw message