View Javadoc

1   /*
2    * $Id: AnchorTest.java 651946 2008-04-27 13:41:38Z apetrelli $
3    *
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "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  
22  package org.apache.struts2.dojo.views.jsp.ui;
23  
24  import org.apache.struts2.dojo.TestAction;
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.setHref("a");
39          tag.setErrorText("c");
40          tag.setLoadingText("d");
41          tag.setBeforeNotifyTopics("e");
42          tag.setAfterNotifyTopics("f");
43          tag.setListenTopics("g");
44          tag.setTargets("h");
45          tag.setHandler("i");
46          tag.setNotifyTopics("j");
47          tag.setIndicator("k");
48          tag.setShowErrorTransportText("true");
49          tag.setShowLoadingText("true");
50          tag.setErrorNotifyTopics("l");
51          tag.setHighlightColor("m");
52          tag.setHighlightDuration("n");
53          tag.setValidate("true");
54          tag.setAjaxAfterValidation("true");
55          tag.setSeparateScripts("true");
56          tag.setTransport("o");
57          tag.setParseContent("false");
58          tag.doStartTag();
59          tag.doEndTag();
60  
61          verify(AnchorTest.class.getResource("href-1.txt"));
62      }
63  
64  }