You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2004/03/11 17:14:06 UTC

cvs commit: jakarta-tapestry/junit/context18/WEB-INF NullSelection.page

hlship      2004/03/11 08:14:06

  Modified:    junit/mock-scripts TestRadio.xml
  Added:       junit/context18 NullSelection.html
               junit/context18/WEB-INF NullSelection.page
  Log:
  Add tests to prove that bug 27591 is invalid.
  
  Revision  Changes    Path
  1.5       +89 -1     jakarta-tapestry/junit/mock-scripts/TestRadio.xml
  
  Index: TestRadio.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/junit/mock-scripts/TestRadio.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestRadio.xml	9 Mar 2004 22:09:52 -0000	1.4
  +++ TestRadio.xml	11 Mar 2004 16:14:06 -0000	1.5
  @@ -291,4 +291,92 @@
   		[NoForm/orphan]
   		</assert-output>
   	</request>
  +	
  +<!-- Now some tests to check for handling of null as the current selection of a RadioGroup. -->
  +
  +	<request>
  +			<parameter name="service" value="page/NullSelection"/>
  +			
  +			<assert-output name="Page Title">
  +<![CDATA[<title>NullSelection</title>]]>	
  +			</assert-output>
  +			
  +			<assert-output name="No Choice">
  +<![CDATA[<input type="radio" name="group" checked="checked" value="0"/> No Choice]]>				
  +			</assert-output>
  +			
  +			<assert-output name="Tapestry">
  +<![CDATA[<input type="radio" name="group" value="1"/> Tapestry]]>				
  +			</assert-output>
  +
  +			<assert-output name="Struts">
  +<![CDATA[<input type="radio" name="group" value="2"/> Struts]]>				
  +			</assert-output>
  +			
  +			<assert-output name="WebWork">
  +<![CDATA[<input type="radio" name="group" value="3"/> WebWork]]>				
  +			</assert-output>
  +			
  +			<assert-output name="Selection">
  +Framework: []
  +			</assert-output>
  +					
  +	</request>
  +	
  +	<!-- Submit the form. -->
  +	
  +	<request>
  +		<parameter name="service" value="direct/1/NullSelection/$Form"/>
  +		<parameter name="sp" value="S0"/>
  +		<parameter name="Form0" value="group"/>
  +		<parameter name="group" value="1"/>
  +		
  +			<assert-output name="No Choice">
  +<![CDATA[<input type="radio" name="group" value="0"/> No Choice]]>				
  +			</assert-output>
  +					
  +			<assert-output name="Tapestry">
  +<![CDATA[<input type="radio" name="group" checked="checked" value="1"/> Tapestry]]>				
  +			</assert-output>
  +
  +			<assert-output name="Struts">
  +<![CDATA[<input type="radio" name="group" value="2"/> Struts]]>				
  +			</assert-output>
  +			
  +			<assert-output name="WebWork">
  +<![CDATA[<input type="radio" name="group" value="3"/> WebWork]]>				
  +			</assert-output>
  +			
  +			<assert-output name="Selection">
  +Framework: [tapestry]
  +			</assert-output>		
  +	</request>
  +	
  +	<!-- Submit the form with *no* selection for group. -->
  +	<request>
  +	  <parameter name="service" value="direct/1/NullSelection/$Form"/>
  +		<parameter name="sp" value="S0"/>
  +		<parameter name="Form0" value="group"/>	
  +
  +			<assert-output name="No Choice">
  +<![CDATA[<input type="radio" name="group" checked="checked" value="0"/> No Choice]]>				
  +			</assert-output>
  +			
  +			<assert-output name="Tapestry">
  +<![CDATA[<input type="radio" name="group" value="1"/> Tapestry]]>				
  +			</assert-output>
  +
  +			<assert-output name="Struts">
  +<![CDATA[<input type="radio" name="group" value="2"/> Struts]]>				
  +			</assert-output>
  +			
  +			<assert-output name="WebWork">
  +<![CDATA[<input type="radio" name="group" value="3"/> WebWork]]>				
  +			</assert-output>
  +			
  +			<assert-output name="Selection">
  +Framework: []
  +			</assert-output>
  +		
  +		</request>			
   </mock-test>
  
  
  
  1.1                  jakarta-tapestry/junit/context18/NullSelection.html
  
  Index: NullSelection.html
  ===================================================================
  <html jwcid="@Shell" title="NullSelection">
  <body jwcid="@Body">
  
  <form jwcid="@Form">
  	
  <span jwcid="group@RadioGroup" selected="ognl:framework">
  	
  	<input type="radio" jwcid="r0@Radio"/> No Choice
  	<input type="radio" jwcid="r1@Radio" value="tapestry"/> Tapestry
  	<br/>
  	<input type="radio" jwcid="r2@Radio" value="struts"/> Struts
  	<br/>
  	<input type="radio" jwcid="r3@Radio" value="webwork"/> WebWork
  </span>
  
  </form>
  
  Framework: [<span jwcid="@Insert" value="ognl:framework"/>]
  
  </body>
  </html>
  
  
  1.1                  jakarta-tapestry/junit/context18/WEB-INF/NullSelection.page
  
  Index: NullSelection.page
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!--
     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.
  -->
  <!-- $Id: NullSelection.page,v 1.1 2004/03/11 16:14:06 hlship Exp $ -->
  <!DOCTYPE page-specification PUBLIC 
    "-//Apache Software Foundation//Tapestry Specification 3.0//EN" 
    "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
  
  <page-specification>
    <property-specification name="framework" type="java.lang.String"/>
  </page-specification>
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org