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("accept", "someAccepted").addToMap(result);
new PropertyHolder("size", "101").addToMap(result);
return result;
|
public void | testGenericAjax()
FileTag tag = new FileTag();
verifyGenericProperties(tag, "ajax", null);
|
public void | testGenericSimple()
FileTag tag = new FileTag();
verifyGenericProperties(tag, "simple", null);
|
public void | testGenericXhtml()
FileTag tag = new FileTag();
verifyGenericProperties(tag, "xhtml", null);
|
public void | testSimple()
TestAction testAction = (TestAction) action;
testAction.setFoo("bar");
FileTag tag = new FileTag();
tag.setPageContext(pageContext);
tag.setLabel("mylabel");
tag.setName("myname");
tag.setAccept("*.txt");
tag.setValue("%{foo}");
tag.setSize("10");
tag.setTitle("mytitle");
tag.doStartTag();
tag.doEndTag();
verify(TextFieldTag.class.getResource("File-1.txt"));
|