cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dani...@apache.org
Subject svn commit: r179300 - in /cocoon/trunk/src/test/org/apache/cocoon/components/blocks: BlocksManagerTestCase.java blocks-sitemap.xmap test3/ test3/COB-INF/ test3/COB-INF/block.xml test3/block-sitemap.xmap test3/test.xml wiring.xml
Date Tue, 31 May 2005 22:35:48 GMT
Author: danielf
Date: Tue May 31 15:35:47 2005
New Revision: 179300

URL: http://svn.apache.org/viewcvs?rev=179300&view=rev
Log:
Test cases for inheritance and polymorphism. Doesn't work yet as it isn't implemented.

Added:
    cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test3/
    cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test3/COB-INF/
    cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test3/COB-INF/block.xml
    cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test3/block-sitemap.xmap   (with
props)
    cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test3/test.xml   (with props)
Modified:
    cocoon/trunk/src/test/org/apache/cocoon/components/blocks/BlocksManagerTestCase.java
    cocoon/trunk/src/test/org/apache/cocoon/components/blocks/blocks-sitemap.xmap
    cocoon/trunk/src/test/org/apache/cocoon/components/blocks/wiring.xml

Modified: cocoon/trunk/src/test/org/apache/cocoon/components/blocks/BlocksManagerTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/test/org/apache/cocoon/components/blocks/BlocksManagerTestCase.java?rev=179300&r1=179299&r2=179300&view=diff
==============================================================================
--- cocoon/trunk/src/test/org/apache/cocoon/components/blocks/BlocksManagerTestCase.java (original)
+++ cocoon/trunk/src/test/org/apache/cocoon/components/blocks/BlocksManagerTestCase.java Tue
May 31 15:35:47 2005
@@ -69,4 +69,20 @@
     public void testBlockSourceSub3() throws Exception {
         pipeTest("sub/test3", "test1/test.xml");
     }
+
+    public void testBlockExtend1() throws Exception {
+        pipeTest("ext/test", "test3/test.xml");
+    }
+
+    public void testBlockExtend2() throws Exception {
+        pipeTest("ext/test2", "test2/test.xml");
+    }
+
+    public void testBlockExtend3() throws Exception {
+        pipeTest("ext/test3", "test3/test.xml");
+    }
+
+    public void testBlockExtend4() throws Exception {
+        pipeTest("ext/test3", "test1/test.xml");
+    }
 }

Modified: cocoon/trunk/src/test/org/apache/cocoon/components/blocks/blocks-sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/test/org/apache/cocoon/components/blocks/blocks-sitemap.xmap?rev=179300&r1=179299&r2=179300&view=diff
==============================================================================
--- cocoon/trunk/src/test/org/apache/cocoon/components/blocks/blocks-sitemap.xmap (original)
+++ cocoon/trunk/src/test/org/apache/cocoon/components/blocks/blocks-sitemap.xmap Tue May
31 15:35:47 2005
@@ -37,6 +37,10 @@
   <map:pipelines>
     <map:pipeline>
 
+      <map:match pattern="ext/**">
+        <map:read src="blocks:/test3/{1}"/>
+      </map:match>
+
       <map:match pattern="**">
         <map:read src="blocks:/test1/{1}"/>
       </map:match>

Added: cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test3/COB-INF/block.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test3/COB-INF/block.xml?rev=179300&view=auto
==============================================================================
--- cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test3/COB-INF/block.xml (added)
+++ cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test3/COB-INF/block.xml Tue
May 31 15:35:47 2005
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-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. 
+-->
+<block xmlns="http://apache.org/cocoon/blocks/cob/1.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+       xsi:schemaLocation="http://apache.org/cocoon/blocks/cob/1.0 cob-schema-1.0.xsd"
+       id="http://cocoon.apache.org/blocks/extendedblock/1.0">
+  <name>extendedblock</name>
+  <description href="http://cocoon.apache.org/blocks/extendedblock/1.0">
+    An extended test block
+  </description>
+  <state href="http://cocoon.apache.org/blocks/extendedblock/1.0/state.html" 
+         community="committed" 
+         interfaces="unstable" 
+         implementation="stable"/>
+  <license href="http://www.apache.org/licenses/">Apache License 2.0</license>
+  <author href="http://cocoon.apache.org">Apache Cocoon community</author>
+  <sitemap src="block-sitemap.xmap"/>
+  <properties>
+    <property name="bar">
+      <default>gazonk</default>
+      <description>Another test property</description>
+    </property>
+  </properties>
+  <extends block="http://cocoon.apache.org/blocks/anyblock/1.0"/>
+</block>
\ No newline at end of file

Added: cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test3/block-sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test3/block-sitemap.xmap?rev=179300&view=auto
==============================================================================
--- cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test3/block-sitemap.xmap (added)
+++ cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test3/block-sitemap.xmap Tue
May 31 15:35:47 2005
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-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.
+-->
+
+<!-- SVN $Id$ -->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+  <map:components>
+
+    <source-factories>
+      <component-instance class="org.apache.cocoon.components.source.impl.BlockSourceFactory"
name="block"/>
+    </source-factories>
+
+    <map:generators default="file">
+      <map:generator name="file" src="org.apache.cocoon.generation.FileGenerator"/>
+    </map:generators>
+
+    <map:transformers default="xslt">
+      <map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer">
+        <xslt-processor-role>xalan</xslt-processor-role>
+      </map:transformer>
+    </map:transformers>
+
+    <map:serializers default="xml">
+      <map:serializer mime-type="text/xml" name="xml" src="org.apache.cocoon.serialization.XMLSerializer"/>
+    </map:serializers>
+
+    <map:matchers default="wildcard">
+      <map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/>
+    </map:matchers>
+
+    <map:pipes default="noncaching">
+      <map:pipe name="noncaching" src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline">
+      </map:pipe>
+    </map:pipes>
+  </map:components>
+
+  <map:pipelines>
+    <map:pipeline>
+
+      <map:match pattern="test">
+        <map:generate type="file" src="test.xml"/>
+        <map:serialize type="xml"/>
+      </map:match>
+
+      <map:match pattern="test4">
+        <map:generate type="file" src="block:super:/test"/>
+        <map:serialize type="xml"/>
+      </map:match>
+
+    </map:pipeline>
+  </map:pipelines>
+</map:sitemap>

Propchange: cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test3/block-sitemap.xmap
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test3/test.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test3/test.xml?rev=179300&view=auto
==============================================================================
--- cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test3/test.xml (added)
+++ cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test3/test.xml Tue May 31 15:35:47
2005
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><test3/>
\ No newline at end of file

Propchange: cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test3/test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: cocoon/trunk/src/test/org/apache/cocoon/components/blocks/wiring.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/test/org/apache/cocoon/components/blocks/wiring.xml?rev=179300&r1=179299&r2=179300&view=diff
==============================================================================
--- cocoon/trunk/src/test/org/apache/cocoon/components/blocks/wiring.xml (original)
+++ cocoon/trunk/src/test/org/apache/cocoon/components/blocks/wiring.xml Tue May 31 15:35:47
2005
@@ -32,4 +32,11 @@
     <mount path="/test2/"/>
   </block>
 
+  <block id="test3id" location="test3/">
+    <mount path="/test3/"/>
+    <connections>
+      <connection name="super" block="test1id"/>
+    </connections>
+  </block>
+
 </wiring>



Mime
View raw message