HiddenTestpublic class HiddenTest 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 = new HashMap();
new PropertyHolder("name", "someName").addToMap(result);
new PropertyHolder("value", "someValue").addToMap(result);
new PropertyHolder("cssClass", "cssClass1", "class=\"cssClass1\"").addToMap(result);
new PropertyHolder("cssStyle", "cssStyle1", "style=\"cssStyle1\"").addToMap(result);
new PropertyHolder("id", "someId").addToMap(result);
return result;
| public void | testGenericAjax()
HiddenTag tag = new HiddenTag();
verifyGenericProperties(tag, "ajax", null);
| public void | testGenericSimple()
HiddenTag tag = new HiddenTag();
verifyGenericProperties(tag, "simple", null);
| public void | testGenericXhtml()
HiddenTag tag = new HiddenTag();
verifyGenericProperties(tag, "xhtml", null);
| public void | testSimple()
TestAction testAction = (TestAction) action;
testAction.setFoo("bar");
HiddenTag tag = new HiddenTag();
tag.setPageContext(pageContext);
tag.setLabel("mylabel");
tag.setName("myname");
tag.setValue("%{foo}");
tag.doStartTag();
tag.doEndTag();
verify(TextFieldTag.class.getResource("Hidden-1.txt"));
|
|