| <?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="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"/> |
| </servlet> |
| |
| <request> |
| <parameter name="service" value="page/NestedSelect"/> |
| |
| <assert-output name="Card"> |
| <![CDATA[ |
| <card id="Exception" title="Exception"> |
| ]]> |
| </assert-output> |
| |
| <assert-output name="Exception Name"> |
| org.apache.tapestry.ApplicationRuntimeException |
| </assert-output> |
| |
| <assert-output name="Exception Messge"> |
| Select components may not be nested. |
| </assert-output> |
| |
| <assert-output name="Component Id"> |
| [NestedSelect/nestedSelect] |
| </assert-output> |
| </request> |
| |
| <request> |
| <parameter name="service" value="page/Select"/> |
| |
| <assert-output name="Card"> |
| <![CDATA[ |
| <card id="Select"> |
| ]]> |
| </assert-output> |
| |
| <assert-output-matches name="Onpick values" subgroup="1"> |
| <![CDATA[ |
| <option .*?onpick="(.*?)".*?> |
| ]]> |
| <match>#sexcard</match> |
| <match>#incomecard</match> |
| <match>#hobbiescard</match> |
| </assert-output-matches> |
| </request> |
| |
| <request> |
| |
| <parameter name="service" value="action/0/Select/0/go"/> |
| |
| <parameter name="Go0" value="sex,income,hobbies"/> |
| <parameter name="sex" value="Male"/> |
| <parameter name="income" value="Over $100K"/> |
| <parameter name="hobbies" value="Skiing,Book,Traveling"/> |
| |
| <assert-output name="Card"> |
| <![CDATA[ |
| <card title="Result" id="Result"> |
| ]]> |
| </assert-output> |
| |
| <assert-output-matches name="Result Values" subgroup="1"> |
| <![CDATA[ |
| <strong>(.*?)</strong> |
| ]]> |
| <match>Male Over $$100K</match> |
| <match>Skiing,Book,Traveling</match> |
| </assert-output-matches> |
| |
| </request> |
| |
| </mock-test> |