blob: fe856132096a735f3f2f9122aaf6c88099a2bb23 [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="c22" root="context22"/>
<servlet name="app" class="org.apache.tapestry.ApplicationServlet"/>
<request>
<assert-output name="Title">
<![CDATA[
<title>Home</title>
]]>
</assert-output>
<assert-output name="Link">
href="/c22/app?service=direct/0/Home/start"
</assert-output>
</request>
<request>
<parameter name="service" value="direct/0/Home/start"/>
<assert-output name="Title">
<![CDATA[
<title>Exception</title>
]]>
</assert-output>
<assert-output name="Error Message">
Component 'Unknown' not found in application namespace.
</assert-output>
<assert name="Check">
request.session.getAttribute("type").equals("Unknown")
</assert>
</request>
<request>
<parameter name="service" value="page/NotFound"/>
<assert-output name="Title">
<![CDATA[
<title>Exception</title>
]]>
</assert-output>
<assert-output name="Error Message">
Page 'NotFound' not found in application namespace.
</assert-output>
<assert name="Check">
request.session.getAttribute("page").equals("NotFound")
</assert>
</request>
<request>
<parameter name="service" value="page/Three"/>
<assert-output name="Title">
<![CDATA[
<title>Exception</title>
]]>
</assert-output>
<assert-output name="Error Message">
Could not find template for component Three/$NoTemplate in locale en.
</assert-output>
<assert name="Check">
request.session.getAttribute("template").equals("context:/WEB-INF/NoTemplate.jwc")
</assert>
</request>
<request
content-type="multipart/form-data; boundary=---------------------------eldorado"
content-path="context22/page-home.request">
<assert-output name="Title">
<![CDATA[
<title>Home</title>
]]>
</assert-output>
</request>
</mock-test>