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 Ian Roughley<a href="mailto:ian@fdar.com"><ian@fdar.com></a>
12: * @version $Id: DivTest.java 2093 2006-02-03 12:28:51Z rgielen $
13: */
14: public class DivTest extends AbstractUITagTest {
15:
16: public void testGenericSimple() throws Exception {
17: DivTag tag = new DivTag();
18: verifyGenericProperties(tag, "simple", new String[] { "value",
19: "tabindex", "disabled" });
20: }
21:
22: public void testGenericXhtml() throws Exception {
23: DivTag tag = new DivTag();
24: verifyGenericProperties(tag, "xhtml", new String[] { "value",
25: "tabindex", "disabled" });
26: }
27:
28: public void testGenericAjax() throws Exception {
29: DivTag tag = new DivTag();
30: verifyGenericProperties(tag, "ajax", new String[] { "value",
31: "tabindex", "disabled" });
32: }
33:
34: public void testSimple() throws Exception {
35: TestAction testAction = (TestAction) action;
36: testAction.setFoo("bar");
37:
38: DivTag tag = new DivTag();
39: tag.setPageContext(pageContext);
40:
41: tag.setId("mylabel");
42: tag.setTheme("ajax");
43: tag.setHref("a");
44: tag.setLoadingText("b");
45: tag.setErrorText("c");
46: tag.setShowErrorTransportText("true");
47: tag.setDelay("4000");
48: tag.setUpdateFreq("1000");
49: tag.setListenTopics("g");
50: tag.setAfterLoading("h");
51:
52: tag.doStartTag();
53: tag.doEndTag();
54:
55: verify(DivTest.class.getResource("div-1.txt"));
56: }
57:
58: }
|