thx for your reply. Yes I already tried used FormTester, but I can't find any method to change the value of a CheckBox besides the "select" method. But my checkbox is a stand-alone one and not part of a group. Using the select method did not results in the outcome I was looking for. :-(
1) Should I use a checkgroup with just one checkbox ? 2) Have I overlooked some other way to change the value of a CheckBox from inside a unittest? In regard to option 1, it feels incorrect to change working code just to facilitate unittesting? If that's what it takes I will change my code. It's just that I wonder if I missed something. regards, Minto van der Sluis jwcarman wrote: > > Have you tried using FormTester? > > On Wed, Oct 22, 2008 at 5:20 AM, Minto van der Sluis > <[EMAIL PROTECTED]> wrote: >> >> Hi folks, >> >> Creating unittests for my pages I managed to read the value a checkbox of >> a >> rendered page. I used: >> >> tester.assertModelValue( "form:myCheckBox, true ); >> >> However I failed to change that value in my unittest prior to submitting >> the >> form. >> >> Can anyone point in the right direction? >> >> Kind regards, >> >> Minto van der Sluis >> >> -- >> View this message in context: >> http://www.nabble.com/how-to-unittest-a-checkbox-tp20106917p20106917.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/how-to-unittest-a-checkbox-tp20106917p20125169.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
