blob: 81f329e60fc5cb3a7e1d0e094b3e10a9210fd8fb [file] [log] [blame]
<?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="home"/>
<assert-output name="Do component">
<![CDATA[
<do type="prev" label="Prev">
]]>
</assert-output>
<assert-output-matches name="Card Ids" subgroup="1">
<![CDATA[
<card .*?id="(.*?)".*?>
]]>
<match>logo</match>
<match>main</match>
<match>anotherCard</match>
</assert-output-matches>
<assert-output name="Timer">
<![CDATA[
<timer name="timer" value="20"/>
]]>
</assert-output>
<assert-output name="Image URL">
<![CDATA[
<img src="/mock/images/image.wbmp" alt="Image" align="middle"/>
]]>
</assert-output>
<assert-output name="Onevent component">
<![CDATA[
<onevent type="onenterforward">
]]>
</assert-output>
<assert-output name="Setvat component">
<![CDATA[
<setvar name="u" value="newbie"/>
]]>
</assert-output>
<assert-output name="Setvat component">
<![CDATA[
<setvar name="l" value=""/>
]]>
</assert-output>
<assert-output name="ServiceLink component">
<![CDATA[
<go href="/mock/app?service=home"/>
]]>
</assert-output>
<!-- PropertySelection -->
<assert-output name="Select">
<![CDATA[
<select name="l">
]]>
</assert-output>
<assert-output-matches name="Option values" subgroup="1">
<![CDATA[
<option value="(.*?)">
]]>
<match>0</match>
<match>1</match>
<match>2</match>
</assert-output-matches>
<assert-output-matches name="Option bodies" subgroup="1">
<![CDATA[
<option .*?>(.*?)</option>
]]>
<match>option_one</match>
<match>option_two</match>
<match>option_three</match>
</assert-output-matches>
<assert-output-matches name="Go Parameter Names" subgroup="1">
<![CDATA[
<postfield name="(.*?)".*?/>
]]>
<match>service</match>
<match>Go0</match>
<match>u</match>
<match>l</match>
</assert-output-matches>
<assert-output-matches name="Go Parameter Values" subgroup="1">
<![CDATA[
<postfield .*?value="(.*?)"/>
]]>
<match>action/0/Home/0/go</match>
<match>u,l</match>
<match>$(username)</match>
<match>$(l)</match>
</assert-output-matches>
</request>
<request>
<parameter name="service" value="action/0/Home/0/go"/>
<parameter name="Go0" value="u,l"/>
<parameter name="u" value="newbie"/>
<parameter name="l" value="0"/>
<assert-output name="Card">
<![CDATA[
<card title="Result" id="Result">
]]>
</assert-output>
<assert-output-matches name="Result Values" subgroup="1">
<![CDATA[
<strong>(.*?)</strong>
]]>
<match>newbie</match>
<match>option_one</match>
</assert-output-matches>
</request>
</mock-test>