1 5 package com.opensymphony.webwork.views.jsp.ui; 6 7 import com.opensymphony.webwork.TestAction; 8 import com.opensymphony.webwork.views.jsp.AbstractUITagTest; 9 10 import java.util.ArrayList ; 11 12 13 19 public class ComboBoxTest extends AbstractUITagTest { 20 22 public void testSimple() throws Exception { 23 TestAction testAction = (TestAction) action; 24 testAction.setFoo("hello"); 25 26 ArrayList collection = new ArrayList (); 27 collection.add("foo"); 28 collection.add("bar"); 29 collection.add("baz"); 30 testAction.setCollection(collection); 31 32 ComboBoxTag tag = new ComboBoxTag(); 33 tag.setPageContext(pageContext); 34 tag.setLabel("mylabel"); 35 tag.setName("foo"); 36 tag.setList("collection"); 37 38 tag.doStartTag(); 39 tag.doEndTag(); 40 41 verify(ComboBoxTag.class.getResource("ComboBox-1.txt")); 42 } 43 } 44 | Popular Tags |