KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > webwork > views > jsp > ui > ComboBoxTest


1 /*
2  * Copyright (c) 2002-2003 by OpenSymphony
3  * All rights reserved.
4  */

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 JavaDoc;
11
12
13 /**
14  * DOCUMENT ME!
15  *
16  * @author $author$
17  * @version $Revision: 1.6 $
18  */

19 public class ComboBoxTest extends AbstractUITagTest {
20     //~ Methods ////////////////////////////////////////////////////////////////
21

22     public void testSimple() throws Exception JavaDoc {
23         TestAction testAction = (TestAction) action;
24         testAction.setFoo("hello");
25
26         ArrayList JavaDoc collection = new ArrayList JavaDoc();
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