| <?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="c7" root="context7"/> |
| |
| <servlet name="lb" class="org.apache.tapestry.ApplicationServlet"/> |
| |
| |
| <request> |
| <parameter name="service" value="page/Two"/> |
| |
| <assert-output name="Page Title"> |
| <![CDATA[ |
| <title>Listener Binding</title> |
| ]]> |
| </assert-output> |
| |
| <assert-output name="Initial Message"> |
| Message: No message. |
| </assert-output> |
| |
| <assert-output name="Link"> |
| <![CDATA[ |
| /c7/lb?service=direct/0/Two/link |
| ]]> |
| </assert-output> |
| |
| </request> |
| |
| <request> |
| <parameter name="service" value="direct/0/Two/link"/> |
| |
| <assert-output name="Page Title"> |
| <![CDATA[ |
| <title>Listener Binding</title> |
| ]]> |
| </assert-output> |
| |
| <assert-output name="Updated Message"> |
| Message: Component was clicked. |
| </assert-output> |
| </request> |
| |
| <request> |
| <parameter name="service" value="reset/Two"/> |
| |
| <assert-output name="Page Title"> |
| <![CDATA[ |
| <title>Listener Binding</title> |
| ]]> |
| </assert-output> |
| |
| <assert-output name="Initial Message"> |
| Message: No message. |
| </assert-output> |
| </request> |
| |
| <request> |
| <parameter name="service" value="direct/0/Two/link"/> |
| |
| <assert-output name="Page Title"> |
| <![CDATA[ |
| <title>Listener Binding</title> |
| ]]> |
| </assert-output> |
| |
| <assert-output name="Updated Message"> |
| Message: Component was clicked. |
| </assert-output> |
| |
| <assert-output name="invalidScriptLink URL"> |
| <![CDATA[ |
| /c7/lb?service=direct/0/Two/invalidScriptLink |
| ]]> |
| </assert-output> |
| |
| <assert-output name="unknownLanguageLink URL"> |
| <![CDATA[ |
| /c7/lb?service=direct/0/Two/unknownLanguageLink |
| ]]> |
| </assert-output> |
| |
| </request> |
| |
| <!-- Trigger a case where the script to execute is invalid. --> |
| |
| <request> |
| <parameter name="service" value="direct/0/Two/invalidScriptLink"/> |
| |
| <assert-output name="Page Title"> |
| <![CDATA[ |
| <title>Exception</title> |
| ]]> |
| </assert-output> |
| |
| <assert-output name="Invalid Script Error Message part 1"> |
| Unable to execute listener script "context:/WEB-INF/Two.page, line 33 |
| </assert-output> |
| |
| <assert-output name="Invalid Script Error Message part 2"> |
| exception from Jython |
| </assert-output> |
| </request> |
| |
| <!-- Trigger a case where the script language is not defined. --> |
| |
| <request> |
| <parameter name="service" value="direct/0/Two/unknownLanguageLink"/> |
| |
| <assert-output name="Page Title"> |
| <![CDATA[ |
| <title>Exception</title> |
| ]]> |
| </assert-output> |
| |
| <assert-output name="Unknown Language Error Message part 1"> |
| Unable to execute listener script "context:/WEB-INF/Two.page, line 43 |
| </assert-output> |
| |
| <assert-output name="Unknown Language Error Message part 2"> |
| unsupported language: DoesNotExist |
| </assert-output> |
| </request> |
| |
| </mock-test> |