commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r610898 - /commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration/TestHierarchicalXMLConfiguration.java
Date Thu, 10 Jan 2008 19:47:41 GMT
Author: oheger
Date: Thu Jan 10 11:47:40 2008
New Revision: 610898

URL: http://svn.apache.org/viewvc?rev=610898&view=rev
Log:
Adapted test to new location of test resources

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

Modified: commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration/TestHierarchicalXMLConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration/TestHierarchicalXMLConfiguration.java?rev=610898&r1=610897&r2=610898&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration/TestHierarchicalXMLConfiguration.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration/TestHierarchicalXMLConfiguration.java
Thu Jan 10 11:47:40 2008
@@ -35,9 +35,6 @@
  */
 public class TestHierarchicalXMLConfiguration extends TestCase
 {
-    /** Test resources directory. */
-    private static final String TEST_DIR = "conf";
-
     /** Test file #1 **/
     private static final String TEST_FILENAME = "testHierarchicalXMLConfiguration.xml";
 
@@ -45,19 +42,19 @@
     private static final String TEST_FILENAME2 = "testHierarchicalXMLConfiguration2.xml";
 
     /** Test file path #1 **/
-    private static final String TEST_FILE = TEST_DIR + File.separator + TEST_FILENAME;
+    private static final String TEST_FILE = ConfigurationAssert.getTestFile(TEST_FILENAME).getAbsolutePath();
 
     /** Test file path #2 **/
-    private static final String TEST_FILE2 = TEST_DIR + File.separator + TEST_FILENAME2;
+    private static final String TEST_FILE2 = ConfigurationAssert.getTestFile(TEST_FILENAME2).getAbsolutePath();
 
     /** Test file path #3.*/
-    private static final String TEST_FILE3 = TEST_DIR + File.separator + "test.xml";
+    private static final String TEST_FILE3 = ConfigurationAssert.getTestFile("test.xml").getAbsolutePath();
 
     /** File name for saving.*/
     private static final String TEST_SAVENAME = "testhierarchicalsave.xml";
 
     /** File path for saving.*/
-    private static final String TEST_SAVE = "target" + File.separator + TEST_SAVENAME;
+    private static final String TEST_SAVE = ConfigurationAssert.getOutFile(TEST_SAVENAME).getAbsolutePath();
 
     /** Instance config used for tests. */
     private XMLConfiguration config;
@@ -106,7 +103,7 @@
 
     public void testLoadBasePath1() throws Exception
     {
-        config.setBasePath(TEST_DIR);
+        config.setBasePath(ConfigurationAssert.TEST_DIR_NAME);
         config.setFileName(TEST_FILENAME);
         config.load();
         configTest(config);



Mime
View raw message