KickJava   Java API By Example, From Geeks To Geeks.

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


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  * User: plightbo
13  * Date: Oct 16, 2003
14  * Time: 10:43:24 PM
15  */

16 public class FileTest extends AbstractUITagTest {
17     //~ Constructors ///////////////////////////////////////////////////////////
18

19     public FileTest() {
20     }
21
22     //~ Methods ////////////////////////////////////////////////////////////////
23

24     public void testSimple() throws Exception JavaDoc {
25         TestAction testAction = (TestAction) action;
26         testAction.setFoo("bar");
27
28         FileTag tag = new FileTag();
29         tag.setPageContext(pageContext);
30         tag.setLabel("mylabel");
31         tag.setName("myname");
32         tag.setAccept("*.txt");
33         tag.setValue("%{foo}");
34         tag.setSize("10");
35
36         tag.doStartTag();
37         tag.doEndTag();
38
39         verify(TextFieldTag.class.getResource("File-1.txt"));
40     }
41 }
42
Popular Tags