01: /*
02: * Copyright (c) 2002-2003 by OpenSymphony
03: * All rights reserved.
04: */
05: package com.opensymphony.webwork.views.jsp.ui;
06:
07: import com.opensymphony.webwork.TestAction;
08: import com.opensymphony.webwork.views.jsp.AbstractUITagTest;
09:
10: /**
11: * @author Matt Ho <a href="mailto:matt@enginegreen.com"><matt@enginegreen.com></a>
12: * @version $Id: PasswordTest.java 2098 2006-02-03 13:14:46Z rgielen $
13: */
14: public class PasswordTest extends AbstractUITagTest {
15:
16: public void testSimple() throws Exception {
17: TestAction testAction = (TestAction) action;
18: testAction.setFoo("bar");
19:
20: PasswordTag tag = new PasswordTag();
21: tag.setPageContext(pageContext);
22: tag.setLabel("mylabel");
23: tag.setName("myname");
24: tag.setTitle("mytitle");
25:
26: tag.doStartTag();
27: tag.doEndTag();
28:
29: verify(PasswordTag.class.getResource("Password-1.txt"));
30: }
31:
32: public void testGenericSimple() throws Exception {
33: PasswordTag tag = new PasswordTag();
34: verifyGenericProperties(tag, "simple", new String[] { "value" });
35: }
36:
37: public void testGenericXhtml() throws Exception {
38: PasswordTag tag = new PasswordTag();
39: verifyGenericProperties(tag, "xhtml", new String[] { "value" });
40: }
41:
42: public void testGenericAjax() throws Exception {
43: PasswordTag tag = new PasswordTag();
44: verifyGenericProperties(tag, "ajax", new String[] { "value" });
45: }
46:
47: }
|