[Httpunit-commit] CVS: httpunit/test/com/meterware/httpunit WebFormTest.java,1.20,1.21
Brought to you by:
russgold
From: Russell G. <rus...@us...> - 2002-05-14 18:38:57
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit In directory usw-pr-cvs1:/tmp/cvs-serv13154/test/com/meterware/httpunit Modified Files: WebFormTest.java Log Message: Allowed sized selects to have no selected value Index: WebFormTest.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/WebFormTest.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- WebFormTest.java 6 Feb 2002 18:38:13 -0000 1.20 +++ WebFormTest.java 14 May 2002 18:38:54 -0000 1.21 @@ -263,6 +263,20 @@ } + public void testSizedSelect() throws Exception { + defineWebPage( "Default", "<form method=POST action = '/servlet/Login'>" + + "<Select name=poems><Option>limerick<Option>haiku</select>" + + "<Select name=songs size=2><Option>aria<Option>folk</select>" + + "<Input type=submit></form>" ); + + WebResponse page = _wc.getResponse( getHostPath() + "/Default.html" ); + + WebForm form = page.getForms()[0]; + assertEquals( "Default poem", "limerick", form.getParameterValue( "poems" ) ); + assertNull( "Default song should be null", form.getParameterValue( "songs" ) ); + } + + public void testMultiSelect() throws Exception { defineWebPage( "Default", "<form method=GET action = \"/ask\">" + "<Select multiple size=4 name=colors>" + |