cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r390870 - in /cocoon/trunk/core/cocoon-core/src/test: java/org/apache/cocoon/ resources/org/apache/cocoon/transformation/
Date Sun, 02 Apr 2006 17:39:03 GMT
Author: cziegeler
Date: Sun Apr  2 10:39:02 2006
New Revision: 390870

URL: http://svn.apache.org/viewcvs?rev=390870&view=rev
Log:
Fix more test cases
Add sax parser to default configuration for test cases

Removed:
    cocoon/trunk/core/cocoon-core/src/test/resources/org/apache/cocoon/transformation/AugmentTransformerTestCase.xtest
    cocoon/trunk/core/cocoon-core/src/test/resources/org/apache/cocoon/transformation/CIncludeTransformerTestCase.xtest
    cocoon/trunk/core/cocoon-core/src/test/resources/org/apache/cocoon/transformation/EncodeURLTransformerTestCase.xtest
    cocoon/trunk/core/cocoon-core/src/test/resources/org/apache/cocoon/transformation/FilterTransformerTestCase.xtest
Modified:
    cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/CocoonTestCase.java

Modified: cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/CocoonTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/CocoonTestCase.java?rev=390870&r1=390869&r2=390870&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/CocoonTestCase.java (original)
+++ cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/CocoonTestCase.java Sun
Apr  2 10:39:02 2006
@@ -25,6 +25,8 @@
 import org.apache.excalibur.source.impl.ResourceSourceFactory;
 import org.apache.excalibur.source.impl.SourceResolverImpl;
 import org.apache.excalibur.source.impl.URLSourceFactory;
+import org.apache.excalibur.xml.impl.JaxpParser;
+import org.apache.excalibur.xml.sax.SAXParser;
 
 /**
  * Testcase for Cocoon. 
@@ -72,6 +74,13 @@
             component.setConfiguration(new DefaultConfiguration("-"));
             info.addComponent(component);
         }
+        if ( this.addSAXParser() ) {
+            ComponentInfo component = new ComponentInfo();
+            component.setComponentClassName(JaxpParser.class.getName());
+            component.setRole(SAXParser.ROLE);
+            component.setConfiguration(new DefaultConfiguration("-"));
+            info.addComponent(component);            
+        }
     }
     
     /**
@@ -89,6 +98,15 @@
      * default is true.
      */
     protected boolean addSourceResolver() {
+        return true;
+    }
+
+    /**
+     * This method should return true if the sax parser should
+     * be added automatically. Can be overwritten by subclasses. The
+     * default is true.
+     */
+    protected boolean addSAXParser() {
         return true;
     }
 }



Mime
View raw message