cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r614148 - in /cocoon/whiteboard/micro/misc: cocoon-micro-it-block/src/main/resources/COB-INF/ cocoon-webapp/src/test/java/org/apache/cocoon/micro/it/
Date Tue, 22 Jan 2008 08:41:56 GMT
Author: reinhard
Date: Tue Jan 22 00:41:55 2008
New Revision: 614148

URL: http://svn.apache.org/viewvc?rev=614148&view=rev
Log:
add test for a local servlet service call

Added:
    cocoon/whiteboard/micro/misc/cocoon-webapp/src/test/java/org/apache/cocoon/micro/it/ServletServiceTest.java
  (with props)
Modified:
    cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/overview.html
    cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sitemap.xmap

Modified: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/overview.html
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/overview.html?rev=614148&r1=614147&r2=614148&view=diff
==============================================================================
--- cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/overview.html
(original)
+++ cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/overview.html
Tue Jan 22 00:41:55 2008
@@ -41,5 +41,9 @@
 		<li><a href="error-handling/custom-error-per-pipeline-error-handling">
 			Custom error - Pipeline</a>: Catch a custom error using a per-pipeline error handler.
<b>*** doesn't work ***</b></li>
 	</ul>
+	<h2>Servlet-Service-Components and servlet: protocol</h2>
+	<ul>
+		<li><a href="ssf/local">servlet:/</a>: Using a local servlet service.</li>
+	</ul>
   </body>
 </html>

Modified: cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sitemap.xmap?rev=614148&r1=614147&r2=614148&view=diff
==============================================================================
--- cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sitemap.xmap
(original)
+++ cocoon/whiteboard/micro/misc/cocoon-micro-it-block/src/main/resources/COB-INF/sitemap.xmap
Tue Jan 22 00:41:55 2008
@@ -63,6 +63,14 @@
       </map:match>
     </map:pipeline>
 
+    <!-- ~~~~~~~~~~~~~~~~ servlet service framework ~~~~~~~~~~~~~~~ -->
+    <map:pipeline>
+      <map:match pattern="ssf/local">
+        <map:generate src="servlet:/sax-pipeline/simple-xml"/>
+        <map:serialize type="xml"/>
+      </map:match>
+    </map:pipeline>
+
     <!-- ~~~~~~~~~~~~~~~~ error handling ~~~~~~~~~~~~~~~ -->
     <map:pipeline>
       <map:match pattern="error-handling/custom-error">

Added: cocoon/whiteboard/micro/misc/cocoon-webapp/src/test/java/org/apache/cocoon/micro/it/ServletServiceTest.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/micro/misc/cocoon-webapp/src/test/java/org/apache/cocoon/micro/it/ServletServiceTest.java?rev=614148&view=auto
==============================================================================
--- cocoon/whiteboard/micro/misc/cocoon-webapp/src/test/java/org/apache/cocoon/micro/it/ServletServiceTest.java
(added)
+++ cocoon/whiteboard/micro/misc/cocoon-webapp/src/test/java/org/apache/cocoon/micro/it/ServletServiceTest.java
Tue Jan 22 00:41:55 2008
@@ -0,0 +1,37 @@
+package org.apache.cocoon.micro.it;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+import org.apache.cocoon.tools.it.HtmlUnitTestCase;
+
+/**
+ * Test the usage of servlet services in Cocoon sitemaps.
+ */
+public class ServletServiceTest extends HtmlUnitTestCase {
+
+    /**
+     * A parameter is passed to an XSLT transformer.
+     */
+    public void testSimplePipelineParameterPassingToTransformer() throws Exception {
+        this.loadXmlPage("ssf/local");
+        assertTrue(this.response.getStatusCode() == 200);
+        assertEquals("text/xml", this.response.getContentType());
+        assertXPath("/html/body/p", "3");
+    }
+
+}

Propchange: cocoon/whiteboard/micro/misc/cocoon-webapp/src/test/java/org/apache/cocoon/micro/it/ServletServiceTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/micro/misc/cocoon-webapp/src/test/java/org/apache/cocoon/micro/it/ServletServiceTest.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/micro/misc/cocoon-webapp/src/test/java/org/apache/cocoon/micro/it/ServletServiceTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message