I am trying to test the case where a user is changing the set of checked
options for a CheckBoxMultipleChoice. When using FormTester.selectMultiple
the new values are added rather than replacing the existing values.
e.g.
first pass:
formTester.selectMultiple(checkboxMultipleChoice, new int {0, 3};
result: user has selected first and fourth items.
second pass:
formTester.selectMultiple(checkboxMultipleChoice, new int {1, 2};
result: user has selected first, second, third, fourth items (0, 1, 2, 3)
desired (and to me, expected) result would be second and third items (1, 2)
How do I get FormTester to unselect values?
I see there is an inner class called
FormTester.ChoiceSelector
but it is protected and the one method that looks promising
assignValueToFormComponent(FormComponent formComponent, java.lang.String
value)
is scant on description.
I know I can look at the source code and extend this class, but this seems
like an awkward solution for what appears to me to be a very common use
case.
Am I missing something simple?
--
View this message in context:
http://www.nabble.com/FormTester-selectMultiple-CheckBoxMultipleChoice-help-tp21971209p21971209.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]