Re: Wicket tests without FormTester
I am trying to unit test a DropDownChoice that is not part of a form and does not use AJAX. I have tried something like: wicketTester.getServletRequest().setParameter(ddc.getInputName(), 0); wicketTester.executeListener(ddc); which causes the DropDownChoice model to fire its setObject method but its input object is always null. Any ideas on the best way to do this testing? Thanks. -- View this message in context: http://old.nabble.com/Wicket-tests-without-FormTester-tp22609725p27782522.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket tests without FormTester
alexander.elsholz wrote: exists a possibility to test, for example a dropdownchoice without formtester? Try http://wicketpagetest.sourceforge.net which should work fine. - -- Kent Tong Better way to unit test Wicket pages (http://wicketpagetest.sourceforge.net) Books on CXF, Axis2, Wicket, JSF (http://agileskills2.org) -- View this message in context: http://old.nabble.com/Wicket-tests-without-FormTester-tp22609725p27788858.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket tests without FormTester
Hi, exists a possibility to test, for example a dropdownchoice without formtester? my ddc isn't placed on a form, so i actually don't know how to test this component - how can i simulate the userinput? i don't want to put this component i a form, only for test. the value is updated via ajax-onchange behavior. thanks alex -- View this message in context: http://www.nabble.com/Wicket-tests-without-FormTester-tp22609725p22609725.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket tests without FormTester
Hi! You can call the following for your dropdowndown component: wicketTester.getServletRequest().setParameter(dropDownComponent.getInputName(), value); .. and then call wiketTester.executeAjaxEvent(dropDownComponent, onchange); ** Martin 2009/3/20 alexander.elsholz alexander.elsh...@widas.de: Hi, exists a possibility to test, for example a dropdownchoice without formtester? my ddc isn't placed on a form, so i actually don't know how to test this component - how can i simulate the userinput? i don't want to put this component i a form, only for test. the value is updated via ajax-onchange behavior. thanks alex -- View this message in context: http://www.nabble.com/Wicket-tests-without-FormTester-tp22609725p22609725.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org