Methods Summary |
---|
private void | prepareTagGeneric(RadioTag tag)
TestAction testAction = (TestAction) action;
testAction.setFoo("bar");
testAction.setList(new String[][]{
{"hello", "world"},
{"foo", "bar"}
});
tag.setList("list");
tag.setListKey("top[0]");
tag.setListValue("top[1]");
|
public void | testGenericAjax()
RadioTag tag = new RadioTag();
prepareTagGeneric(tag);
verifyGenericProperties(tag, "ajax", new String[]{"id","value"});
|
public void | testGenericSimple()
RadioTag tag = new RadioTag();
prepareTagGeneric(tag);
verifyGenericProperties(tag, "simple", new String[]{"id","value"});
|
public void | testGenericXhtml()
RadioTag tag = new RadioTag();
prepareTagGeneric(tag);
verifyGenericProperties(tag, "xhtml", new String[]{"id","value"});
|
public void | testMapChecked()
TestAction testAction = (TestAction) action;
testAction.setFoo("bar");
HashMap map = new HashMap();
map.put("1", "One");
map.put("2", "Two");
testAction.setMap(map);
RadioTag tag = new RadioTag();
tag.setPageContext(pageContext);
tag.setLabel("mylabel");
tag.setName("myname");
tag.setValue("\"1\"");
tag.setList("map");
tag.setListKey("key");
tag.setListValue("value");
tag.doStartTag();
tag.doEndTag();
verify(RadioTag.class.getResource("Radio-2.txt"));
|
public void | testMapWithBooleanAsKey()
TestAction testAction = (TestAction) action;
HashMap map = new LinkedHashMap();
map.put(Boolean.TRUE, "male");
map.put(Boolean.FALSE, "female");
testAction.setMap(map);
RadioTag tag = new RadioTag();
tag.setPageContext(pageContext);
tag.setLabel("mylabel");
tag.setName("myname");
tag.setValue("%{true}");
tag.setList("map");
tag.doStartTag();
tag.doEndTag();
verify(RadioTag.class.getResource("Radio-3.txt"));
|
public void | testSimple()
TestAction testAction = (TestAction) action;
testAction.setFoo("bar");
testAction.setList(new String[][]{
{"hello", "world"},
{"foo", "bar"}
});
RadioTag tag = new RadioTag();
tag.setPageContext(pageContext);
tag.setLabel("mylabel");
tag.setName("myname");
tag.setValue("");
tag.setList("list");
tag.setListKey("top[0]");
tag.setListValue("top[1]");
tag.doStartTag();
tag.doEndTag();
verify(RadioTag.class.getResource("Radio-1.txt"));
|