You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by an...@apache.org on 2006/08/10 04:17:01 UTC
svn commit: r430212 - in /tapestry/tapestry4/trunk/tapestry-framework/src:
scripts/ test/org/apache/tapestry/junit/mock/app/
Author: andyhot
Date: Wed Aug 9 19:17:01 2006
New Revision: 430212
URL: http://svn.apache.org/viewvc?rev=430212&view=rev
Log:
TAPESTRY-199: Tests for new Relation component
Added:
tapestry/tapestry4/trunk/tapestry-framework/src/scripts/TestShellAndRelation.xml
tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/junit/mock/app/Styled.html
tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/junit/mock/app/Styled.page
Modified:
tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/junit/mock/app/Mock.application
Added: tapestry/tapestry4/trunk/tapestry-framework/src/scripts/TestShellAndRelation.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/scripts/TestShellAndRelation.xml?rev=430212&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/scripts/TestShellAndRelation.xml (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/scripts/TestShellAndRelation.xml Wed Aug 9 19:17:01 2006
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2004, 2005 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.
+-->
+
+<mock-test>
+ <context name="mock"/>
+
+ <servlet name="app" class="org.apache.tapestry.ApplicationServlet">
+ <init-parameter
+ name="org.apache.tapestry.application-specification"
+ value="/org/apache/tapestry/junit/mock/app/Mock.application"/>
+ </servlet>
+
+ <!-- Check that Relation component correctly adds a stylesheet in head. -->
+
+ <request>
+ <parameter name="service" value="page"/>
+ <parameter name="page" value="Styled"/>
+
+ <assert-output name="Added stylesheet">
+<![CDATA[
+<link rel="stylesheet" type="text/css" href="dummy.css"/>
+]]>
+ </assert-output>
+
+ </request>
+
+</mock-test>
+
Modified: tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/junit/mock/app/Mock.application
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/junit/mock/app/Mock.application?rev=430212&r1=430211&r2=430212&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/junit/mock/app/Mock.application (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/junit/mock/app/Mock.application Wed Aug 9 19:17:01 2006
@@ -51,7 +51,9 @@
<page name="ContextAssetTemplate" specification-path="ContextAssetTemplate.page"/>
- <page name="RelativeAssets" specification-path="RelativeAssets.page"/>
+ <page name="RelativeAssets" specification-path="RelativeAssets.page"/>
+
+ <page name="Styled" specification-path="Styled.page"/>
<library id="lib" specification-path="/org/apache/tapestry/junit/mock/lib/MockLibrary.library"/>
Added: tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/junit/mock/app/Styled.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/junit/mock/app/Styled.html?rev=430212&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/junit/mock/app/Styled.html (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/junit/mock/app/Styled.html Wed Aug 9 19:17:01 2006
@@ -0,0 +1,9 @@
+
+<span jwcid="$content$">
+<span jwcid="border">
+
+<link jwcid="@Relation" href="dummy.css"/>
+Empty page...
+
+</span>
+</span>
Added: tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/junit/mock/app/Styled.page
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/junit/mock/app/Styled.page?rev=430212&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/junit/mock/app/Styled.page (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/junit/mock/app/Styled.page Wed Aug 9 19:17:01 2006
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2004, 2005 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.
+-->
+
+<!DOCTYPE page-specification PUBLIC
+ "-//Apache Software Foundation//Tapestry Specification 3.0//EN"
+ "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
+
+<page-specification class="org.apache.tapestry.junit.mock.app.Home">
+
+ <component id="border" type="lib:Border">
+ <message-binding name="title" key="page.title"/>
+ </component>
+
+</page-specification>