tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1226500 - /tomcat/trunk/test/org/apache/catalina/startup/TestWebRuleSet.java
Date Mon, 02 Jan 2012 18:24:36 GMT
Author: markt
Date: Mon Jan  2 18:24:36 2012
New Revision: 1226500

URL: http://svn.apache.org/viewvc?rev=1226500&view=rev
Log:
Get tests working with Ant as well as IDEs

Modified:
    tomcat/trunk/test/org/apache/catalina/startup/TestWebRuleSet.java

Modified: tomcat/trunk/test/org/apache/catalina/startup/TestWebRuleSet.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TestWebRuleSet.java?rev=1226500&r1=1226499&r2=1226500&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/startup/TestWebRuleSet.java (original)
+++ tomcat/trunk/test/org/apache/catalina/startup/TestWebRuleSet.java Mon Jan  2 18:24:36
2012
@@ -16,6 +16,9 @@
  */
 package org.apache.catalina.startup;
 
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
 import java.io.InputStream;
 
 import static org.junit.Assert.assertEquals;
@@ -114,7 +117,7 @@ public class TestWebRuleSet {
 
 
     private synchronized void parse(WebXml webXml, String target,
-            boolean fragment, boolean expected) {
+            boolean fragment, boolean expected) throws FileNotFoundException {
 
         Digester d;
         if (fragment) {
@@ -127,8 +130,8 @@ public class TestWebRuleSet {
 
         d.push(webXml);
 
-        InputStream is = this.getClass().getClassLoader().getResourceAsStream(
-                "org/apache/catalina/startup/" + target);
+        File f = new File("test/org/apache/catalina/startup/" + target);
+        InputStream is = new FileInputStream(f);
 
         boolean result = true;
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message