You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by oh...@apache.org on 2005/07/20 20:33:19 UTC
svn commit: r219960 -
/jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestXMLPropertiesConfiguration.java
Author: oheger
Date: Wed Jul 20 11:33:14 2005
New Revision: 219960
URL: http://svn.apache.org/viewcvs?rev=219960&view=rev
Log:
Fixed a bug in the unit test for XMLPropertiesConfiguration, which showed up after configurations loaded from classpath have a valid base path
Modified:
jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestXMLPropertiesConfiguration.java
Modified: jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestXMLPropertiesConfiguration.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestXMLPropertiesConfiguration.java?rev=219960&r1=219959&r2=219960&view=diff
==============================================================================
--- jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestXMLPropertiesConfiguration.java (original)
+++ jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestXMLPropertiesConfiguration.java Wed Jul 20 11:33:14 2005
@@ -16,6 +16,8 @@
package org.apache.commons.configuration;
+import java.io.File;
+
import junit.framework.TestCase;
/**
@@ -47,10 +49,15 @@
conf.setHeader("Description of the new property list");
// save the configuration
- conf.save("target/test2.properties.xml");
+ File saveFile = new File("target/test2.properties.xml");
+ if (saveFile.exists())
+ {
+ assertTrue(saveFile.delete());
+ }
+ conf.save(saveFile);
// reload the configuration
- XMLPropertiesConfiguration conf2 = new XMLPropertiesConfiguration("target/test2.properties.xml");
+ XMLPropertiesConfiguration conf2 = new XMLPropertiesConfiguration(saveFile);
// test the configuration
assertEquals("header", "Description of the new property list", conf2.getHeader());
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org