commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject svn commit: r652654 - in /commons/proper/configuration/branches/configuration2_experimental: pom.xml src/test/java/org/apache/commons/configuration2/TestDefaultConfigurationBuilder.java src/test/resources/resources.jar
Date Thu, 01 May 2008 20:41:28 GMT
Author: ebourg
Date: Thu May  1 13:41:27 2008
New Revision: 652654

URL: http://svn.apache.org/viewvc?rev=652654&view=rev
Log:
Restored the test for loading a configuration from a JAR in the classpath

Modified:
    commons/proper/configuration/branches/configuration2_experimental/pom.xml
    commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestDefaultConfigurationBuilder.java
    commons/proper/configuration/branches/configuration2_experimental/src/test/resources/resources.jar

Modified: commons/proper/configuration/branches/configuration2_experimental/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/pom.xml?rev=652654&r1=652653&r2=652654&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/pom.xml (original)
+++ commons/proper/configuration/branches/configuration2_experimental/pom.xml Thu May  1 13:41:27
2008
@@ -332,6 +332,9 @@
           <artifactId>maven-surefire-plugin</artifactId>
           <configuration>
             <forkMode>once</forkMode>
+            <additionalClasspathElements>
+              <additionalClasspathElement>src/test/resources/resources.jar</additionalClasspathElement>
+            </additionalClasspathElements>
             <systemProperties>
               <property>
                 <name>java.awt.headless</name>

Modified: commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestDefaultConfigurationBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestDefaultConfigurationBuilder.java?rev=652654&r1=652653&r2=652654&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestDefaultConfigurationBuilder.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestDefaultConfigurationBuilder.java
Thu May  1 13:41:27 2008
@@ -18,6 +18,7 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.net.URL;
 import java.util.Collection;
 import java.util.Set;
 
@@ -316,6 +317,16 @@
         checkConfiguration();
     }
 
+    public void testLoadConfigurationFromJAR() throws Exception
+    {
+        URL url = Thread.currentThread().getContextClassLoader().getResource("config-jar.xml");
+        assertNotNull("config-jar.xml not found on the classpath", url);
+        factory.load(url);
+
+        Configuration conf = factory.getConfiguration();
+        assertFalse("The configuration is empty", conf.isEmpty());
+    }
+
     /**
      * Tests if the configuration was correctly created by the factory.
      */

Modified: commons/proper/configuration/branches/configuration2_experimental/src/test/resources/resources.jar
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/test/resources/resources.jar?rev=652654&r1=652653&r2=652654&view=diff
==============================================================================
Binary files - no diff available.



Mime
View raw message