You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "alexander.elsholz" <al...@widas.de> on 2009/03/19 23:30:55 UTC
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Wicket tests without FormTester
Posted by shetc <sh...@bellsouth.net>.
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Wicket tests without FormTester
Posted by Martin Makundi <ma...@koodaripalvelut.com>.
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 <al...@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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Wicket tests without FormTester
Posted by Kent Tong <ke...@cpttm.org.mo>.
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org