01: /*
02: * $Id: DateTimePickerTagTest.java 508602 2007-02-16 21:53:54Z musachy $
03: *
04: * Licensed to the Apache Software Foundation (ASF) under one
05: * or more contributor license agreements. See the NOTICE file
06: * distributed with this work for additional information
07: * regarding copyright ownership. The ASF licenses this file
08: * to you under the Apache License, Version 2.0 (the
09: * "License"); you may not use this file except in compliance
10: * with the License. You may obtain a copy of the License at
11: *
12: * http://www.apache.org/licenses/LICENSE-2.0
13: *
14: * Unless required by applicable law or agreed to in writing,
15: * software distributed under the License is distributed on an
16: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17: * KIND, either express or implied. See the License for the
18: * specific language governing permissions and limitations
19: * under the License.
20: */
21: package org.apache.struts2.views.jsp.ui;
22:
23: import org.apache.struts2.views.jsp.AbstractUITagTest;
24:
25: /**
26: */
27: public class DateTimePickerTagTest extends AbstractUITagTest {
28:
29: public void testGenericSimple() throws Exception {
30: AbstractRemoteCallUITag tag = new DivTag();
31: verifyGenericProperties(tag, "simple", new String[] { "value",
32: "tabindex", "disabled" });
33: }
34:
35: public void testGenericXhtml() throws Exception {
36: AbstractRemoteCallUITag tag = new DivTag();
37: verifyGenericProperties(tag, "xhtml", new String[] { "value",
38: "tabindex", "disabled" });
39: }
40:
41: public void testGenericAjax() throws Exception {
42: AbstractRemoteCallUITag tag = new DivTag();
43: verifyGenericProperties(tag, "ajax", new String[] { "value",
44: "tabindex", "disabled" });
45: }
46:
47: public void testSimple() throws Exception {
48: DateTimePickerTag tag = new DateTimePickerTag();
49: tag.setPageContext(pageContext);
50:
51: tag.setId("id");
52: tag.setTheme("ajax");
53:
54: tag.setAdjustWeeks("true");
55: tag.setDayWidth("b");
56: tag.setDisplayWeeks("true");
57: tag.setEndDate("d");
58: tag.setStartDate("e");
59: tag.setStaticDisplay("false");
60: tag.setWeekStartsOn("g");
61: tag.setName("h");
62: tag.setLanguage("i");
63: tag.setTemplateCssPath("j");
64: tag.doStartTag();
65: tag.doEndTag();
66:
67: verify(DateTimePickerTagTest.class
68: .getResource("DateTimePickerTagTest-1.txt"));
69: }
70:
71: }
|