|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectwicket.util.tester.FormTester
public class FormTester
A helper for testing validaiton and submission of Form component.
| Nested Class Summary | |
|---|---|
protected class |
FormTester.ChoiceSelector
A selector template for selecting seletable form component via index of option, support RadioGroup, CheckGroup, and AbstractChoice family. |
| Constructor Summary | |
|---|---|
protected |
FormTester(java.lang.String path,
Form workingForm,
WicketTester wicketTester,
boolean fillBlankString)
|
| Method Summary | |
|---|---|
void |
select(java.lang.String formComponentId,
int index)
simulate selecting an option of a Form Component. |
void |
selectMultiple(java.lang.String formComponentId,
int[] indexes)
A convenient method to select multiple options for the form component. |
void |
setValue(java.lang.String formComponentId,
java.lang.String value)
simulate filling a field of a Form. |
void |
submit()
submit the form. |
void |
submit(java.lang.String buttonComponentId)
A convenient method to submit form with alternative button. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected FormTester(java.lang.String path,
Form workingForm,
WicketTester wicketTester,
boolean fillBlankString)
path - path to form componentworkingForm - form component to be testwicketTester - wicketTester that create FormTesterfillBlankString - specify whether filling child Text Components with blank
StringWicketTester.newFormTester(String)| Method Detail |
|---|
public void setValue(java.lang.String formComponentId,
java.lang.String value)
formComponentId - relative path (from form) to formComponentvalue - field value of form.public void submit()
public void submit(java.lang.String buttonComponentId)
formTester.setValue("to:my:button", "value on the button");
formTester.submit();
buttonComponentId - relative path (from form) to the button
public void select(java.lang.String formComponentId,
int index)
formComponentId - relative path (from form) to selectable formComponentindex - index of selectable option, start from 0
public void selectMultiple(java.lang.String formComponentId,
int[] indexes)
formComponentId - relative path (from form) to selectable formComponentindexes - index of selectable option, start from 0select(String, int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||