KickJava   Java API By Example, From Geeks To Geeks.

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


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 import com.opensymphony.webwork.views.jsp.ui.HrefTag;
10
11
12 /**
13  * @author Ian Roughley<a HREF="mailto:ian@fdar.com">&lt;ian@fdar.com&gt;</a>
14  * @version $Id: HrefTest.java,v 1.1 2005/08/11 01:48:04 roughley Exp $
15  */

16 public class HrefTest extends AbstractUITagTest {
17     //~ Methods ////////////////////////////////////////////////////////////////
18

19
20     public void testSimple() throws Exception JavaDoc {
21         TestAction testAction = (TestAction) action;
22         testAction.setFoo("bar");
23
24         HrefTag tag = new HrefTag();
25         tag.setPageContext(pageContext);
26
27         tag.setId("mylink");
28         tag.setTheme("ajax");
29         tag.setHref("a");
30         tag.setErrorText("c");
31         tag.setShowErrorTransportText("true");
32         tag.setNotifyTopics("g");
33         tag.setAfterLoading("h");
34
35         tag.doStartTag();
36         tag.doEndTag();
37
38         verify(HrefTest.class.getResource("href-1.txt"));
39     }
40
41 }
42
Popular Tags