| <?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" root="context51" /> |
| |
| <servlet name="app" class="org.apache.tapestry.ApplicationServlet"> |
| <init-parameter |
| name="org.apache.tapestry.application-specification" |
| value="/org/apache/tapestry/junit/mock/wml/Mock.application" /> |
| <init-parameter |
| name="org.apache.tapestry.application-mode" value="wml" /> |
| </servlet> |
| |
| <request> |
| <parameter name="service" value="page" /> |
| <parameter name="page" value="Input" /> |
| |
| <assert-output name="Input component"> |
| <![CDATA[ |
| <input type="text" name="fname" title="FName" value="Ronnie" /> |
| ]]> |
| </assert-output> |
| |
| <assert-output name="Input component"> |
| <![CDATA[ |
| <input type="text" name="lname" title="LName" /> |
| ]]> |
| </assert-output> |
| |
| </request> |
| |
| <request> |
| <parameter name="service" value="page" /> |
| <parameter name="page" value="NoGo" /> |
| |
| <assert-output name="Card"> |
| <![CDATA[ |
| <card id="Exception" title="Exception"> |
| ]]> |
| </assert-output> |
| |
| <assert-output name="Exception Name"> |
| org.apache.hivemind.ApplicationRuntimeException |
| </assert-output> |
| |
| <assert-output name="Exception Messge"> |
| Component NoGo/orphan must be enclosed by a form, but no Form component has been stored into the request cycle. |
| </assert-output> |
| |
| </request> |
| |
| <request> |
| <parameter name="service" value="direct" /> |
| <parameter name="page" value="Rewind" /> |
| <parameter name="direct" value="1" /> |
| <parameter name="component" value="h" /> |
| <parameter name="formids" value="v" /> |
| <parameter name="reservedids" value="direct" /> |
| <parameter name="v" value="VVV" /> |
| |
| <assert-output name="Card"> |
| <![CDATA[ |
| <card title="Result" id="Result"> |
| ]]> |
| </assert-output> |
| |
| <assert-output-matches name="Result Values" subgroup="1"> |
| <![CDATA[ |
| <strong>(.*?)</strong> |
| ]]> |
| <match>VVV</match> |
| <match>VVV</match> |
| </assert-output-matches> |
| |
| </request> |
| |
| <request> |
| <parameter name="service" value="direct" /> |
| <parameter name="page" value="Rewind" /> |
| <parameter name="component" value="g" /> |
| |
| <parameter name="formids" value="v" /> |
| <parameter name="u" value="VVV" /> |
| |
| <assert-output name="Card"> |
| <![CDATA[ |
| <card id="StaleLink" title="StaleLink"> |
| ]]> |
| </assert-output> |
| |
| <assert-output name="Cause"> |
| Rewind of form Rewind/g expected allocated id #1 to be 'v', but was 'u' (requested by component Rewind/u). |
| </assert-output> |
| |
| </request> |
| |
| </mock-test> |
| |