Methods Summary |
---|
private void | prepareTagGeneric(ComboBoxTag tag)
TestAction testAction = (TestAction) action;
ArrayList collection = new ArrayList();
collection.add("foo");
collection.add("bar");
collection.add("baz");
testAction.setCollection(collection);
tag.setList("collection");
|
public void | testGenericAjax()
ComboBoxTag tag = new ComboBoxTag();
prepareTagGeneric(tag);
verifyGenericProperties(tag, "ajax", null);
|
public void | testGenericSimple()
ComboBoxTag tag = new ComboBoxTag();
prepareTagGeneric(tag);
verifyGenericProperties(tag, "simple", null);
|
public void | testGenericXhtml()
ComboBoxTag tag = new ComboBoxTag();
prepareTagGeneric(tag);
verifyGenericProperties(tag, "xhtml", null);
|
public void | testSimple()
TestAction testAction = (TestAction) action;
testAction.setFoo("hello");
ArrayList collection = new ArrayList();
collection.add("foo");
collection.add("bar");
collection.add("baz");
testAction.setCollection(collection);
ComboBoxTag tag = new ComboBoxTag();
tag.setPageContext(pageContext);
tag.setLabel("mylabel");
tag.setName("foo");
tag.setId("cb");
tag.setList("collection");
tag.doStartTag();
tag.doEndTag();
verify(ComboBoxTag.class.getResource("ComboBox-1.txt"));
|
public void | testWithEmptyOptionAndHeader()
TestAction testAction = (TestAction) action;
testAction.setFoo("banana");
List l = new ArrayList();
l.add("apple");
l.add("banana");
l.add("pineaple");
l.add("grapes");
testAction.setCollection(l);
ComboBoxTag tag = new ComboBoxTag();
tag.setPageContext(pageContext);
tag.setLabel("My Favourite Fruit");
tag.setName("myFavouriteFruit");
tag.setEmptyOption("true");
tag.setHeaderKey("-1");
tag.setHeaderValue("--- Please Select ---");
tag.setList("collection");
tag.setValue("%{foo}");
tag.doStartTag();
tag.doEndTag();
verify(ComboBoxTag.class.getResource("ComboBox-2.txt"));
|
public void | testWithMap()
TestAction testAction = (TestAction) action;
testAction.setFoo("banana");
Map m = new LinkedHashMap();
m.put("apple", "apple");
m.put("banana", "banana");
m.put("pineaple", "pineaple");
m.put("grapes", "grapes");
testAction.setMap(m);
ComboBoxTag tag = new ComboBoxTag();
tag.setPageContext(pageContext);
tag.setLabel("My Favourite Fruit");
tag.setName("myFavouriteFruit");
tag.setHeaderKey("-1");
tag.setHeaderValue("--- Please Select ---");
tag.setEmptyOption("true");
tag.setList("map");
tag.setValue("%{foo}");
tag.doStartTag();
tag.doEndTag();
verify(ComboBoxTag.class.getResource("ComboBox-3.txt"));
|