1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.apache.struts2.views.jsp.ui;
23
24 import org.apache.struts2.TestAction;
25 import org.apache.struts2.views.jsp.AbstractUITagTest;
26
27
28 /***
29 */
30 public class DivTest extends AbstractUITagTest {
31
32
33 public void testGenericSimple() throws Exception {
34 DivTag tag = new DivTag();
35 verifyGenericProperties(tag, "simple", new String[]{"value","tabindex","disabled"});
36 }
37
38 public void testGenericXhtml() throws Exception {
39 DivTag tag = new DivTag();
40 verifyGenericProperties(tag, "xhtml", new String[]{"value","tabindex","disabled"});
41 }
42
43 public void testSimple() throws Exception {
44 TestAction testAction = (TestAction) action;
45 testAction.setFoo("bar");
46
47 DivTag tag = new DivTag();
48 tag.setPageContext(pageContext);
49 tag.setId("mylabel");
50 tag.doStartTag();
51 tag.doEndTag();
52
53 verify(DivTest.class.getResource("div-1.txt"));
54 }
55
56 }