01: /*
02: * $Id: AnchorTest.java 508280 2007-02-16 02:07:56Z 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.TestAction;
24: import org.apache.struts2.views.jsp.AbstractUITagTest;
25:
26: /**
27: */
28: public class AnchorTest extends AbstractUITagTest {
29:
30: public void testSimple() throws Exception {
31: TestAction testAction = (TestAction) action;
32: testAction.setFoo("bar");
33:
34: AnchorTag tag = new AnchorTag();
35: tag.setPageContext(pageContext);
36:
37: tag.setId("mylink");
38: tag.setTheme("ajax");
39: tag.setHref("a");
40: tag.setErrorText("c");
41: tag.setLoadingText("d");
42: tag.setAfterLoading("e");
43: tag.setBeforeLoading("f");
44: tag.setListenTopics("g");
45: tag.setTargets("h");
46: tag.setHandler("i");
47: tag.setNotifyTopics("j");
48: tag.setIndicator("k");
49: tag.setShowErrorTransportText("true");
50: tag.setShowLoadingText("true");
51: tag.doStartTag();
52: tag.doEndTag();
53:
54: verify(AnchorTest.class.getResource("href-1.txt"));
55: }
56:
57: }
|