1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.struts2.views.jsp.ui;
22
23 import org.apache.struts2.TestAction;
24 import org.apache.struts2.views.jsp.AbstractUITagTest;
25
26
27 /***
28 */
29 public class AnchorTest extends AbstractUITagTest {
30
31
32 public void testSimple() throws Exception {
33 TestAction testAction = (TestAction) action;
34 testAction.setFoo("bar");
35
36 AnchorTag tag = new AnchorTag();
37 tag.setPageContext(pageContext);
38
39 tag.setId("mylink");
40 tag.setTheme("ajax");
41 tag.setHref("a");
42 tag.setErrorText("c");
43 tag.setLoadingText("d");
44 tag.setAfterLoading("e");
45 tag.setBeforeLoading("f");
46 tag.setListenTopics("g");
47 tag.setTargets("h");
48 tag.setHandler("i");
49 tag.setNotifyTopics("j");
50 tag.setIndicator("k");
51 tag.setShowErrorTransportText("true");
52 tag.doStartTag();
53 tag.doEndTag();
54
55 verify(AnchorTest.class.getResource("href-1.txt"));
56 }
57
58 }