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(AbstractUITag,
String, String[])} as properties to verify. This implementation extends testdata from AbstractUITag.
Map result = new HashMap();
new PropertyHolder("title", "someTitle").addToMap(result);
new PropertyHolder("cssClass", "cssClass1", "class=\"cssClass1\"").addToMap(result);
new PropertyHolder("cssStyle", "cssStyle1", "style=\"cssStyle1\"").addToMap(result);
new PropertyHolder("name", "someName").addToMap(result);
new PropertyHolder("value", "someValue").addToMap(result);
return result;
|
public void | testButtonSimple()
TestAction testAction = (TestAction) action;
testAction.setFoo("bar");
ResetTag tag = new ResetTag();
tag.setPageContext(pageContext);
tag.setType("button");
tag.setName("myname");
tag.setValue("%{foo}");
tag.doStartTag();
tag.doEndTag();
verify(TextFieldTag.class.getResource("Reset-3.txt"));
|
public void | testButtonWithLabel()
TestAction testAction = (TestAction) action;
testAction.setFoo("bar");
ResetTag tag = new ResetTag();
tag.setPageContext(pageContext);
tag.setLabel("mylabel");
tag.setType("button");
tag.setAlign("left");
tag.setName("myname");
tag.setValue("%{foo}");
tag.doStartTag();
tag.doEndTag();
verify(TextFieldTag.class.getResource("Reset-4.txt"));
|
public void | testDefaultValues()
TestAction testAction = (TestAction) action;
testAction.setFoo("bar");
ResetTag tag = new ResetTag();
tag.setPageContext(pageContext);
tag.setLabel("mylabel");
tag.setName("myname");
tag.setTitle("mytitle");
tag.doStartTag();
tag.doEndTag();
verify(TextFieldTag.class.getResource("Reset-2.txt"));
|
public void | testGenericAjax()
ResetTag tag = new ResetTag();
verifyGenericProperties(tag, "ajax", null);
|
public void | testGenericSimple()
ResetTag tag = new ResetTag();
verifyGenericProperties(tag, "simple", null);
|
public void | testGenericXhtml()
ResetTag tag = new ResetTag();
verifyGenericProperties(tag, "xhtml", null);
|
public void | testSimple()
TestAction testAction = (TestAction) action;
testAction.setFoo("bar");
ResetTag tag = new ResetTag();
tag.setPageContext(pageContext);
tag.setLabel("mylabel");
tag.setAlign("left");
tag.setName("myname");
tag.setValue("%{foo}");
tag.doStartTag();
tag.doEndTag();
verify(TextFieldTag.class.getResource("Reset-1.txt"));
|