cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lgaw...@apache.org
Subject svn commit: r569702 - in /cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/test: java/org/apache/cocoon/template/jxtg/ resources/org/apache/cocoon/template/jxtg/
Date Sat, 25 Aug 2007 16:41:20 GMT
Author: lgawron
Date: Sat Aug 25 09:41:19 2007
New Revision: 569702

URL: http://svn.apache.org/viewvc?rev=569702&view=rev
Log:
yet another failing test

Added:
    cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/test/resources/org/apache/cocoon/template/jxtg/jxPrefixMapping-output.xml
  (with props)
    cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/test/resources/org/apache/cocoon/template/jxtg/jxPrefixMapping.xml
  (with props)
Modified:
    cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/test/java/org/apache/cocoon/template/jxtg/JXTemplateGeneratorTestCase.java

Modified: cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/test/java/org/apache/cocoon/template/jxtg/JXTemplateGeneratorTestCase.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/test/java/org/apache/cocoon/template/jxtg/JXTemplateGeneratorTestCase.java?rev=569702&r1=569701&r2=569702&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/test/java/org/apache/cocoon/template/jxtg/JXTemplateGeneratorTestCase.java
(original)
+++ cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/test/java/org/apache/cocoon/template/jxtg/JXTemplateGeneratorTestCase.java
Sat Aug 25 09:41:19 2007
@@ -29,8 +29,7 @@
 import org.w3c.dom.Document;
 
 /**
- * @version SVN $Id: JXTemplateGeneratorTestCase.java 358974 2005-12-25
- *          14:00:24Z lgawron $
+ * @version SVN $Id$
  */
 public class JXTemplateGeneratorTestCase extends SitemapComponentTestCase {
     String docBase = "resource://org/apache/cocoon/template/jxtg/";
@@ -57,8 +56,7 @@
     public void setUp() throws Exception {
         super.setUp();
 
-        newObjectModel = (ObjectModel) getBeanFactory().getBean(
-                ObjectModel.ROLE);
+        newObjectModel = (ObjectModel) getBeanFactory().getBean(ObjectModel.ROLE);
     }
 
     public Map getFlowContext() {
@@ -66,8 +64,7 @@
     }
 
     public void addFlowContextToObjectModel(ObjectModel newObjectModel) {
-        FlowHelper.setContextObject(getObjectModel(), newObjectModel,
-                flowContext);
+        FlowHelper.setContextObject(getObjectModel(), newObjectModel, flowContext);
     }
 
     public ObjectModel getNewObjectModel() {
@@ -238,6 +235,14 @@
         getNewObjectModel().markLocalContext();
         getFlowContext().put("importURI", importURI);
         addFlowContextToObjectModel(getNewObjectModel());
+        assertEqual(load(outputURI), generate(JX, inputURI, EMPTY_PARAMS));
+        getNewObjectModel().cleanupLocalContext();
+    }
+
+    public void testPrefixMapping() throws Exception {
+        String inputURI = docBase + "jxPrefixMapping.xml";
+        String outputURI = docBase + "jxPrefixMapping-output.xml";
+        getNewObjectModel().markLocalContext();
         assertEqual(load(outputURI), generate(JX, inputURI, EMPTY_PARAMS));
         getNewObjectModel().cleanupLocalContext();
     }

Added: cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/test/resources/org/apache/cocoon/template/jxtg/jxPrefixMapping-output.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/test/resources/org/apache/cocoon/template/jxtg/jxPrefixMapping-output.xml?rev=569702&view=auto
==============================================================================
--- cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/test/resources/org/apache/cocoon/template/jxtg/jxPrefixMapping-output.xml
(added)
+++ cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/test/resources/org/apache/cocoon/template/jxtg/jxPrefixMapping-output.xml
Sat Aug 25 09:41:19 2007
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+<root xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+	<foo xmlns="http://foor.org/bar/1.0">
+		<inner>bar</inner>
+	</foo>
+	<outer>bar</outer>
+</root>

Propchange: cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/test/resources/org/apache/cocoon/template/jxtg/jxPrefixMapping-output.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/test/resources/org/apache/cocoon/template/jxtg/jxPrefixMapping-output.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/test/resources/org/apache/cocoon/template/jxtg/jxPrefixMapping.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/test/resources/org/apache/cocoon/template/jxtg/jxPrefixMapping.xml?rev=569702&view=auto
==============================================================================
--- cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/test/resources/org/apache/cocoon/template/jxtg/jxPrefixMapping.xml
(added)
+++ cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/test/resources/org/apache/cocoon/template/jxtg/jxPrefixMapping.xml
Sat Aug 25 09:41:19 2007
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+<root xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+	<foo xmlns="http://foor.org/bar/1.0">
+		<jx:set var="foo" value="bar"/>
+		<inner>${foo}</inner>
+	</foo>
+	<outer>${foo}</outer>
+</root>

Propchange: cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/test/resources/org/apache/cocoon/template/jxtg/jxPrefixMapping.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/test/resources/org/apache/cocoon/template/jxtg/jxPrefixMapping.xml
------------------------------------------------------------------------------
    svn:keywords = Id



Mime
View raw message