commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1463693 - /commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestCombinedConfiguration.java
Date Tue, 02 Apr 2013 19:09:09 GMT
Author: oheger
Date: Tue Apr  2 19:09:09 2013
New Revision: 1463693

URL: http://svn.apache.org/r1463693
Log:
Changed test class: Only use methods from FileBased interface to load and save XMLConfiguration
objects.

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

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestCombinedConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestCombinedConfiguration.java?rev=1463693&r1=1463692&r2=1463693&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestCombinedConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestCombinedConfiguration.java
Tue Apr  2 19:09:09 2013
@@ -24,10 +24,6 @@ import static org.junit.Assert.assertNul
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.PrintWriter;
 import java.io.StringReader;
 import java.io.StringWriter;
 import java.util.Collection;
@@ -38,6 +34,7 @@ import junit.framework.Assert;
 
 import org.apache.commons.configuration.event.ConfigurationEvent;
 import org.apache.commons.configuration.event.ConfigurationListener;
+import org.apache.commons.configuration.io.FileHandler;
 import org.apache.commons.configuration.tree.DefaultExpressionEngine;
 import org.apache.commons.configuration.tree.NodeCombiner;
 import org.apache.commons.configuration.tree.OverrideCombiner;
@@ -636,10 +633,10 @@ public class TestCombinedConfiguration
         assertEquals("Wrong attribute value", "USER2",
                 x3.getString("key2[@override]"));
         StringWriter w = new StringWriter();
-        x3.save(w);
+        new FileHandler(x3).save(w);
         String s = w.toString();
         x3 = new XMLConfiguration();
-        x3.load(new StringReader(s));
+        new FileHandler(x3).load(new StringReader(s));
         assertEquals("Wrong element value after load", "value2.2",
                 x3.getString("key2"));
         assertEquals("Wrong attribute value after load", "USER2",



Mime
View raw message