KickJava   Java API By Example, From Geeks To Geeks.

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


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
11 /**
12  * @author Matt Ho <a HREF="mailto:matt@enginegreen.com">&lt;matt@enginegreen.com&gt;</a>
13  * @version $Id: TextareaTest.java,v 1.11 2005/07/20 14:49:15 plightbo Exp $
14  */

15 public class TextareaTest extends AbstractUITagTest {
16     //~ Methods ////////////////////////////////////////////////////////////////
17

18     public void testSimple() throws Exception JavaDoc {
19         TestAction testAction = (TestAction) action;
20         testAction.setFoo("bar");
21
22         TextareaTag tag = new TextareaTag();
23         tag.setPageContext(pageContext);
24         tag.setLabel("mylabel");
25         tag.setName("myname");
26         tag.setValue("%{foo}");
27         tag.setRows("30");
28         tag.setCols("20");
29         tag.setDisabled("true");
30         tag.setTabindex("5");
31         tag.setOnchange("alert('goodbye');");
32         tag.setOnclick("alert('onclick');");
33         tag.setId("the_id");
34         tag.setOnkeyup("alert('hello');");
35         tag.setReadonly("true");
36
37         tag.doStartTag();
38         tag.doEndTag();
39
40         verify(TextareaTag.class.getResource("Textarea-1.txt"));
41     }
42 }
43
Popular Tags