| <?xml version="1.0" encoding="UTF-8"?> |
| |
| <!-- $Id$ --> |
| <!-- |
| Copyright 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. |
| --> |
| <mock-test> |
| <context name="c5" root="context5"/> |
| |
| <servlet name="app" class="org.apache.tapestry.ApplicationServlet"> |
| <init-parameter |
| name="org.apache.tapestry.visit-class" |
| value="org.apache.tapestry.junit.mock.c5.Visit"/> |
| </servlet> |
| |
| <request> |
| |
| <assert-output name="Title"> |
| <![CDATA[ |
| <title>Home</title> |
| ]]> |
| </assert-output> |
| |
| <assert-output name="Direct Status"> |
| DirectLink HAS NOT been triggered. |
| </assert-output> |
| |
| <assert-output name="Action Status"> |
| ActionLink HAS NOT been triggered. |
| </assert-output> |
| |
| <assert-output name="Form Status"> |
| Form HAS NOT been triggered. |
| </assert-output> |
| |
| <assert-output name="Direct URL"> |
| <![CDATA[ |
| href="/c5/app?service=direct/1/Home/DirectLinkHolder/$DirectLink" |
| ]]> |
| </assert-output> |
| |
| <assert-output name="Action URL"> |
| <![CDATA[ |
| href="/c5/app?service=action/1/Home/0/ActionLinkHolder/$ActionLink" |
| ]]> |
| </assert-output> |
| |
| <assert-output name="Form Context"> |
| <![CDATA[ |
| <input type="hidden" name="service" value="direct/1/Home/FormHolder/$Form"/> |
| ]]> |
| </assert-output> |
| |
| </request> |
| |
| <request> |
| <parameter name="service" value="direct/1/Home/DirectLinkHolder/$DirectLink"/> |
| |
| <assert-output name="Updated Direct Status"> |
| DirectLink HAS been triggered. |
| </assert-output> |
| |
| </request> |
| |
| <request> |
| <parameter name="service" value="action/1/Home/0/ActionLinkHolder/$ActionLink"/> |
| |
| <assert-output name="Updated Action Status"> |
| ActionLink HAS been triggered. |
| </assert-output> |
| </request> |
| |
| <request> |
| <parameter name="service" value="direct/1/Home/FormHolder/$Form"/> |
| <parameter name="sp" value="S1"/> |
| <parameter name="$Submit" value="Trigger"/> |
| <parameter name="Form1" value="$Submit"/> |
| |
| <assert-output name="Form Status"> |
| Form HAS been triggered. |
| </assert-output> |
| |
| </request> |
| |
| </mock-test> |
| |