cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dani...@apache.org
Subject svn commit: r178988 - in /cocoon/trunk/src/test/org/apache/cocoon/components/blocks: BlocksManagerTestCase.java BlocksManagerTestCase.xconf blocks-sitemap.xmap test1/block-sitemap.xmap test2/test.xml
Date Sun, 29 May 2005 21:00:25 GMT
Author: danielf
Date: Sun May 29 14:00:24 2005
New Revision: 178988

URL: http://svn.apache.org/viewcvs?rev=178988&view=rev
Log:
Tests for the block: protocol.

Modified:
    cocoon/trunk/src/test/org/apache/cocoon/components/blocks/BlocksManagerTestCase.java
    cocoon/trunk/src/test/org/apache/cocoon/components/blocks/BlocksManagerTestCase.xconf
    cocoon/trunk/src/test/org/apache/cocoon/components/blocks/blocks-sitemap.xmap
    cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test1/block-sitemap.xmap
    cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test2/test.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=178988&r1=178987&r2=178988&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 Sun
May 29 14:00:24 2005
@@ -45,4 +45,12 @@
     public void testBlocksSource() throws Exception {
         process("test");
     }
+
+    public void testBlockSource1() throws Exception {
+        process("test2");
+    }
+
+    public void testBlockSource2() throws Exception {
+        process("test3");
+    }
 }

Modified: cocoon/trunk/src/test/org/apache/cocoon/components/blocks/BlocksManagerTestCase.xconf
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/test/org/apache/cocoon/components/blocks/BlocksManagerTestCase.xconf?rev=178988&r1=178987&r2=178988&view=diff
==============================================================================
--- cocoon/trunk/src/test/org/apache/cocoon/components/blocks/BlocksManagerTestCase.xconf
(original)
+++ cocoon/trunk/src/test/org/apache/cocoon/components/blocks/BlocksManagerTestCase.xconf
Sun May 29 14:00:24 2005
@@ -37,8 +37,8 @@
     <component-instance class="org.apache.excalibur.source.impl.ResourceSourceFactory"
name="resource"/>
     <component-instance class="org.apache.cocoon.components.source.impl.ContextSourceFactory"
name="context"/>
     <component-instance class="org.apache.excalibur.source.impl.FileSourceFactory" name="file"/>
-    <component-instance class="org.apache.excalibur.source.impl.URLSourceFactory" name="*"/>
     <component-instance class="org.apache.cocoon.components.source.impl.BlocksSourceFactory"
name="blocks"/>
+    <component-instance class="org.apache.excalibur.source.impl.URLSourceFactory" name="*"/>
   </source-factories>
 
   <component role="org.apache.cocoon.components.blocks.BlocksManager"

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=178988&r1=178987&r2=178988&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 Sun May
29 14:00:24 2005
@@ -37,8 +37,8 @@
   <map:pipelines>
     <map:pipeline>
 
-      <map:match pattern="test">
-        <map:read src="blocks:/test1/test"/>
+      <map:match pattern="*">
+        <map:read src="blocks:/test1/{1}"/>
       </map:match>
 
     </map:pipeline>

Modified: cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test1/block-sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test1/block-sitemap.xmap?rev=178988&r1=178987&r2=178988&view=diff
==============================================================================
--- cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test1/block-sitemap.xmap (original)
+++ cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test1/block-sitemap.xmap Sun
May 29 14:00:24 2005
@@ -20,6 +20,10 @@
 <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>
@@ -49,6 +53,16 @@
 
       <map:match pattern="test">
         <map:generate type="file" src="test.xml"/>
+        <map:serialize type="xml"/>
+      </map:match>
+
+      <map:match pattern="test2">
+        <map:generate type="file" src="block:test2:/test"/>
+        <map:serialize type="xml"/>
+      </map:match>
+
+      <map:match pattern="test3">
+        <map:generate type="file" src="block:/test"/>
         <map:serialize type="xml"/>
       </map:match>
 

Modified: cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test2/test.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test2/test.xml?rev=178988&r1=178987&r2=178988&view=diff
==============================================================================
--- cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test2/test.xml (original)
+++ cocoon/trunk/src/test/org/apache/cocoon/components/blocks/test2/test.xml Sun May 29 14:00:24
2005
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><test/>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?><test2/>
\ No newline at end of file



Mime
View raw message