TextareaTestpublic class TextareaTest extends org.apache.struts2.views.jsp.AbstractUITagTest
Methods Summary |
---|
protected java.util.Map | initializedGenericTagTestProperties()Initialize a map of {@link org.apache.struts2.views.jsp.AbstractUITagTest.PropertyHolder} for generic tag
property testing. Will be used when calling {@link #verifyGenericProperties(org.apache.struts2.views.jsp.ui.AbstractUITag,
String, String[])} as properties to verify. This implementation extends testdata from AbstractUITag.
Map result = super.initializedGenericTagTestProperties();
new PropertyHolder("cols", "10").addToMap(result);
new PropertyHolder("rows", "11").addToMap(result);
new PropertyHolder("readonly", "true", "readonly=\"readonly\"").addToMap(result);
new PropertyHolder("wrap", "soft").addToMap(result);
return result;
| public void | testGenericAjax()
TextareaTag tag = new TextareaTag();
verifyGenericProperties(tag, "ajax", new String[] {"value"});
| public void | testGenericSimple()
TextareaTag tag = new TextareaTag();
verifyGenericProperties(tag, "simple", new String[] {"value"});
| public void | testGenericXhtml()
TextareaTag tag = new TextareaTag();
verifyGenericProperties(tag, "xhtml", new String[] {"value"});
| public void | testSimple()
TestAction testAction = (TestAction) action;
testAction.setFoo("bar");
TextareaTag tag = new TextareaTag();
tag.setPageContext(pageContext);
tag.setLabel("mylabel");
tag.setName("myname");
tag.setValue("%{foo}");
tag.setRows("30");
tag.setCols("20");
tag.setTitle("mytitle");
tag.setDisabled("true");
tag.setTabindex("5");
tag.setOnchange("alert('goodbye');");
tag.setOnclick("alert('onclick');");
tag.setId("the_id");
tag.setOnkeyup("alert('hello');");
tag.setReadonly("true");
tag.doStartTag();
tag.doEndTag();
verify(TextareaTag.class.getResource("Textarea-1.txt"));
|
|