KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > renderkit > html > HtmlOutputLinkCactusTest


1 /*
2  * Copyright 2002,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.myfaces.renderkit.html;
17
18 import com.meterware.httpunit.WebLink;
19 import com.meterware.httpunit.WebResponse;
20
21 import org.apache.cactus.ServletTestCase;
22
23 import javax.servlet.RequestDispatcher JavaDoc;
24
25 /**
26  * @author Manfred Geiler (latest modification by $Author: matze $)
27  * @version $Revision: 1.3 $ $Date: 2004/10/13 11:50:56 $
28  * $Log: HtmlOutputLinkCactusTest.java,v $
29  * Revision 1.3 2004/10/13 11:50:56 matze
30  * renamed packages to org.apache
31  *
32  * Revision 1.2 2004/07/01 21:57:56 mwessendorf
33  * ASF switch
34  *
35  * Revision 1.1 2004/05/04 06:36:20 manolito
36  * Bugfix #947302
37  *
38  */

39 public class HtmlOutputLinkCactusTest
40         extends ServletTestCase
41 {
42     //private static final Log log = LogFactory.getLog(HtmlInputHiddenTagCactusTest.class);
43

44     public HtmlOutputLinkCactusTest(String JavaDoc name) {
45         super(name);
46     }
47
48     public void testSimpleRender() throws Exception JavaDoc
49     {
50         RequestDispatcher JavaDoc rd = config.getServletContext().getRequestDispatcher(
51                 "/HtmlOutputLinkCactusTest.jsf");
52         // render the page for the first time
53
rd.forward(request, response);
54     }
55
56     public void endSimpleRender(WebResponse response)
57             throws Exception JavaDoc
58     {
59         WebLink link;
60         link = response.getLinkWithID("outputLink1");
61         assertNotNull(link);
62         assertEquals(link.getURLString(), "http://www.myfaces.org/?p1=v1&p2=v2&p3=v3");
63
64         link = response.getLinkWithID("outputLink2");
65         assertNotNull(link);
66         assertEquals(link.getURLString(), "http://www.myfaces.org/?p1=v1&p2=v2&p3=v3");
67     }
68 }
69
Popular Tags