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("value", "true").addToMap(result);
return result;
|
public void | testChecked()
TestAction testAction = (TestAction) action;
testAction.setFoo("true");
CheckboxTag tag = new CheckboxTag();
tag.setPageContext(pageContext);
tag.setId("someId");
tag.setLabel("mylabel");
tag.setName("foo");
tag.setFieldValue("baz");
tag.setOnfocus("test();");
tag.setTitle("mytitle");
tag.doStartTag();
tag.doEndTag();
verify(CheckboxTag.class.getResource("Checkbox-1.txt"));
|
public void | testCheckedWithError()
TestAction testAction = (TestAction) action;
testAction.setFoo("true");
testAction.addFieldError("foo", "Some Foo Error");
testAction.addFieldError("foo", "Another Foo Error");
CheckboxTag tag = new CheckboxTag();
tag.setPageContext(pageContext);
tag.setLabel("mylabel");
tag.setName("foo");
tag.setFieldValue("baz");
tag.setOndblclick("test();");
tag.setOnclick("test();");
tag.setTitle("mytitle");
tag.doStartTag();
tag.doEndTag();
verify(CheckboxTag.class.getResource("Checkbox-3.txt"));
|
public void | testCheckedWithLeftLabelPosition()
TestAction testAction = (TestAction) action;
testAction.setFoo("true");
CheckboxTag tag = new CheckboxTag();
tag.setPageContext(pageContext);
tag.setId("someId");
tag.setLabel("mylabel");
tag.setName("foo");
tag.setFieldValue("baz");
tag.setOnfocus("test();");
tag.setTitle("mytitle");
tag.setLabelposition("left");
tag.doStartTag();
tag.doEndTag();
verify(CheckboxTag.class.getResource("Checkbox-5.txt"));
|
public void | testCheckedWithTopLabelPosition()
TestAction testAction = (TestAction) action;
testAction.setFoo("true");
CheckboxTag tag = new CheckboxTag();
tag.setPageContext(pageContext);
tag.setId("someId");
tag.setLabel("mylabel");
tag.setName("foo");
tag.setFieldValue("baz");
tag.setOnfocus("test();");
tag.setTitle("mytitle");
tag.setLabelposition("top");
tag.doStartTag();
tag.doEndTag();
verify(CheckboxTag.class.getResource("Checkbox-4.txt"));
|
public void | testGenericAjax()
CheckboxTag tag = new CheckboxTag();
verifyGenericProperties(tag, "ajax", null);
|
public void | testGenericSimple()
CheckboxTag tag = new CheckboxTag();
verifyGenericProperties(tag, "simple", null);
|
public void | testGenericXhtml()
CheckboxTag tag = new CheckboxTag();
verifyGenericProperties(tag, "xhtml", null);
|
public void | testUnchecked()
TestAction testAction = (TestAction) action;
testAction.setFoo("false");
CheckboxTag tag = new CheckboxTag();
tag.setPageContext(pageContext);
tag.setLabel("mylabel");
tag.setName("foo");
tag.setFieldValue("baz");
tag.setTitle("mytitle");
tag.doStartTag();
tag.doEndTag();
verify(CheckboxTag.class.getResource("Checkbox-2.txt"));
|