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 PasswordTest extends AbstractUITagTest {
31
32 public void testSimple() throws Exception {
33 TestAction testAction = (TestAction) action;
34 testAction.setFoo("bar");
35
36 PasswordTag tag = new PasswordTag();
37 tag.setPageContext(pageContext);
38 tag.setLabel("mylabel");
39 tag.setName("myname");
40 tag.setTitle("mytitle");
41
42 tag.doStartTag();
43 tag.doEndTag();
44
45 verify(PasswordTag.class.getResource("Password-1.txt"));
46 }
47
48 public void testGenericSimple() throws Exception {
49 PasswordTag tag = new PasswordTag();
50 verifyGenericProperties(tag, "simple", new String[]{"value"});
51 }
52
53 public void testGenericXhtml() throws Exception {
54 PasswordTag tag = new PasswordTag();
55 verifyGenericProperties(tag, "xhtml", new String[]{"value"});
56 }
57 }