cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r394102 - in /cocoon/trunk: blocks/cocoon-chaperon/cocoon-chaperon-impl/src/test/resources/org/apache/cocoon/transformation/ core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/ core/cocoon-core/src/test/java/org/apache/c...
Date Fri, 14 Apr 2006 14:06:09 GMT
Author: cziegeler
Date: Fri Apr 14 07:06:07 2006
New Revision: 394102

URL: http://svn.apache.org/viewcvs?rev=394102&view=rev
Log:
Fix test framework
Fix test cases for chaperon block

Modified:
    cocoon/trunk/blocks/cocoon-chaperon/cocoon-chaperon-impl/src/test/resources/org/apache/cocoon/transformation/LexicalTransformerTestCase.xtest
    cocoon/trunk/blocks/cocoon-chaperon/cocoon-chaperon-impl/src/test/resources/org/apache/cocoon/transformation/ParserTransformerTestCase.xtest
    cocoon/trunk/blocks/cocoon-chaperon/cocoon-chaperon-impl/src/test/resources/org/apache/cocoon/transformation/PatternTransformerTestCase.xtest
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/ConfigReader.java
    cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/core/container/ContainerTestCase.java

Modified: cocoon/trunk/blocks/cocoon-chaperon/cocoon-chaperon-impl/src/test/resources/org/apache/cocoon/transformation/LexicalTransformerTestCase.xtest
URL: http://svn.apache.org/viewcvs/cocoon/trunk/blocks/cocoon-chaperon/cocoon-chaperon-impl/src/test/resources/org/apache/cocoon/transformation/LexicalTransformerTestCase.xtest?rev=394102&r1=394101&r2=394102&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-chaperon/cocoon-chaperon-impl/src/test/resources/org/apache/cocoon/transformation/LexicalTransformerTestCase.xtest
(original)
+++ cocoon/trunk/blocks/cocoon-chaperon/cocoon-chaperon-impl/src/test/resources/org/apache/cocoon/transformation/LexicalTransformerTestCase.xtest
Fri Apr 14 07:06:07 2006
@@ -16,14 +16,14 @@
 -->
 <testcase>
  <roles>
-  <role name="org.apache.excalibur.xml.sax.SAXParser"
-        shorthand="xml-parser"
-        default-class="org.apache.excalibur.xml.impl.JaxpParser"/>
-
   <role name="org.apache.cocoon.transformation.TransformerSelector"
         shorthand="transformers"
         default-class="org.apache.cocoon.core.container.DefaultServiceSelector"/>
 
+  <role name="org.apache.excalibur.xmlizer.XMLizer"
+        shorthand="xmlizer"
+        default-class="org.apache.excalibur.xmlizer.DefaultXMLizer"/>
+
   <role name="org.apache.excalibur.store.Store/TransientStore"
         shorthand="transient-store"
         default-class="org.apache.excalibur.store.impl.MemoryStore"/>
@@ -34,18 +34,6 @@
  </roles>
 
  <components>
-  <xml-parser class="org.apache.excalibur.xml.impl.JaxpParser">
-   <parameter name="validate" value="false"/>
-   <parameter name="namespace-prefixes" value="false"/>
-   <parameter name="stop-on-warning" value="true"/>
-   <parameter name="stop-on-recoverable-error" value="true"/>
-   <parameter name="reuse-parsers" value="false"/>
-  </xml-parser>
-
-  <transient-store/>
-
-  <persistent-store/>
-
   <transformers>
    <component-instance class="org.apache.cocoon.transformation.LexicalTransformer" name="lexer"/>
   </transformers>

Modified: cocoon/trunk/blocks/cocoon-chaperon/cocoon-chaperon-impl/src/test/resources/org/apache/cocoon/transformation/ParserTransformerTestCase.xtest
URL: http://svn.apache.org/viewcvs/cocoon/trunk/blocks/cocoon-chaperon/cocoon-chaperon-impl/src/test/resources/org/apache/cocoon/transformation/ParserTransformerTestCase.xtest?rev=394102&r1=394101&r2=394102&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-chaperon/cocoon-chaperon-impl/src/test/resources/org/apache/cocoon/transformation/ParserTransformerTestCase.xtest
(original)
+++ cocoon/trunk/blocks/cocoon-chaperon/cocoon-chaperon-impl/src/test/resources/org/apache/cocoon/transformation/ParserTransformerTestCase.xtest
Fri Apr 14 07:06:07 2006
@@ -16,14 +16,14 @@
 -->
 <testcase>
  <roles>
-  <role name="org.apache.excalibur.xml.sax.SAXParser"
-        shorthand="xml-parser"
-        default-class="org.apache.excalibur.xml.impl.JaxpParser"/>
-
   <role name="org.apache.cocoon.transformation.TransformerSelector"
         shorthand="transformers"
         default-class="org.apache.cocoon.core.container.DefaultServiceSelector"/>
 
+  <role name="org.apache.excalibur.xmlizer.XMLizer"
+        shorthand="xmlizer"
+        default-class="org.apache.excalibur.xmlizer.DefaultXMLizer"/>
+
   <role name="org.apache.excalibur.store.Store/TransientStore"
         shorthand="transient-store"
         default-class="org.apache.excalibur.store.impl.MemoryStore"/>
@@ -34,18 +34,6 @@
  </roles>
 
  <components>
-  <xml-parser class="org.apache.excalibur.xml.impl.JaxpParser">
-   <parameter name="validate" value="false"/>
-   <parameter name="namespace-prefixes" value="false"/>
-   <parameter name="stop-on-warning" value="true"/>
-   <parameter name="stop-on-recoverable-error" value="true"/>
-   <parameter name="reuse-parsers" value="false"/>
-  </xml-parser>
-
-  <transient-store/>
-
-  <persistent-store/>
-
   <transformers logger="test">
    <component-instance class="org.apache.cocoon.transformation.ParserTransformer" 
                        name="parser"/>

Modified: cocoon/trunk/blocks/cocoon-chaperon/cocoon-chaperon-impl/src/test/resources/org/apache/cocoon/transformation/PatternTransformerTestCase.xtest
URL: http://svn.apache.org/viewcvs/cocoon/trunk/blocks/cocoon-chaperon/cocoon-chaperon-impl/src/test/resources/org/apache/cocoon/transformation/PatternTransformerTestCase.xtest?rev=394102&r1=394101&r2=394102&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-chaperon/cocoon-chaperon-impl/src/test/resources/org/apache/cocoon/transformation/PatternTransformerTestCase.xtest
(original)
+++ cocoon/trunk/blocks/cocoon-chaperon/cocoon-chaperon-impl/src/test/resources/org/apache/cocoon/transformation/PatternTransformerTestCase.xtest
Fri Apr 14 07:06:07 2006
@@ -16,14 +16,14 @@
 -->
 <testcase>
  <roles>
-  <role name="org.apache.excalibur.xml.sax.SAXParser"
-        shorthand="xml-parser"
-        default-class="org.apache.excalibur.xml.impl.JaxpParser"/>
-
   <role name="org.apache.cocoon.transformation.TransformerSelector"
         shorthand="transformers"
         default-class="org.apache.cocoon.core.container.DefaultServiceSelector"/>
 
+  <role name="org.apache.excalibur.xmlizer.XMLizer"
+        shorthand="xmlizer"
+        default-class="org.apache.excalibur.xmlizer.DefaultXMLizer"/>
+
   <role name="org.apache.excalibur.store.Store/TransientStore"
         shorthand="transient-store"
         default-class="org.apache.excalibur.store.impl.MemoryStore"/>
@@ -34,18 +34,6 @@
  </roles>
 
  <components>
-  <xml-parser class="org.apache.excalibur.xml.impl.JaxpParser">
-   <parameter name="validate" value="false"/>
-   <parameter name="namespace-prefixes" value="false"/>
-   <parameter name="stop-on-warning" value="true"/>
-   <parameter name="stop-on-recoverable-error" value="true"/>
-   <parameter name="reuse-parsers" value="false"/>
-  </xml-parser>
-
-  <transient-store/>
-
-  <persistent-store/>
-
   <transformers>
    <component-instance class="org.apache.cocoon.transformation.PatternTransformer" name="pattern"/>
   </transformers>

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/ConfigReader.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/ConfigReader.java?rev=394102&r1=394101&r2=394102&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/ConfigReader.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/ConfigReader.java
Fri Apr 14 07:06:07 2006
@@ -440,10 +440,9 @@
     protected final void configureRoles( final Configuration configuration )
     throws ConfigurationException {
         final Configuration[] roles = configuration.getChildren();
-
         for( int i = 0; i < roles.length; i++ ) {
-            Configuration role = roles[i];
-            
+            final Configuration role = roles[i];
+
             if (!"role".equals(role.getName())) {
                 throw new ConfigurationException("Unexpected '" + role.getName() + "' element
at " + role.getLocation());
             }

Modified: cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/core/container/ContainerTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/core/container/ContainerTestCase.java?rev=394102&r1=394101&r2=394102&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/core/container/ContainerTestCase.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/core/container/ContainerTestCase.java
Fri Apr 14 07:06:07 2006
@@ -1,16 +1,16 @@
-/* 
+/*
  * Copyright 2002-2004 The Apache Software Foundation
  * Licensed  under the  Apache License,  Version 2.0  (the "License");
  * you may not use  this file  except in  compliance with the License.
  * You may obtain a copy of the License at 
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed  under the  License is distributed on an "AS IS" BASIS,
  * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or
  * implied.
- * 
+ *
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
@@ -18,6 +18,8 @@
 
 import java.io.InputStream;
 import java.net.URL;
+import java.util.Iterator;
+import java.util.Map;
 
 import junit.framework.TestCase;
 
@@ -123,10 +125,10 @@
  * @version $Id$
  */
 public class ContainerTestCase extends TestCase {
-    
+
     /** The default logger */
     private Logger logger;
-    
+
     /** The service manager to use */
     private ServiceManager manager;
 
@@ -161,7 +163,7 @@
         this.logger = new ConsoleLogger(Integer.parseInt(level));
         this.prepare();
     }
-    
+
     /**
      * Initializes the ComponentLocator
      *
@@ -283,7 +285,7 @@
     throws Exception {
         // subclasses can add components here
     }
-    
+
     final private void setupManagers( final Configuration confCM,
                                       final Configuration confRM)
     throws Exception {
@@ -296,11 +298,11 @@
         this.rootBeanFactory = BeanFactoryUtil.createRootBeanFactory(avalonEnv);
         // read roles
         ConfigurationInfo rolesInfo = ConfigReader.readConfiguration(confRM, null, avalonEnv,
null);
+        this.addComponents( rolesInfo );
         ConfigurableListableBeanFactory rolesContext = BeanFactoryUtil.createBeanFactory(avalonEnv,
rolesInfo, null, this.rootBeanFactory, false);
 
         // read components
         ConfigurationInfo componentsInfo = ConfigReader.readConfiguration(confCM, rolesInfo,
avalonEnv, null);
-        this.addComponents( componentsInfo );
         ConfigurableListableBeanFactory componentsContext = BeanFactoryUtil.createBeanFactory(avalonEnv,
componentsInfo, null, rolesContext, false);
 
         this.manager = (ServiceManager)componentsContext.getBean(ServiceManager.class.getName());
@@ -314,7 +316,7 @@
     protected final void release( final Object object ) {
         manager.release( object );
     }
-    
+
     private Object getComponent(String classname,
                                 Configuration conf,
                                 Parameters p) 
@@ -340,7 +342,7 @@
         ContainerUtil.initialize(instance);
         return instance;
     }
-    
+
     protected Object getComponent(String classname,
                                   Configuration conf) 
     throws Exception {
@@ -352,7 +354,7 @@
     throws Exception {
         return this.getComponent(classname, null, p);
     }
-    
+
     protected Object getComponent(String classname) 
     throws Exception {
         return this.getComponent(classname, null, null);



Mime
View raw message