1 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 ; 24 25 39 public class HtmlOutputLinkCactusTest 40 extends ServletTestCase 41 { 42 44 public HtmlOutputLinkCactusTest(String name) { 45 super(name); 46 } 47 48 public void testSimpleRender() throws Exception 49 { 50 RequestDispatcher rd = config.getServletContext().getRequestDispatcher( 51 "/HtmlOutputLinkCactusTest.jsf"); 52 rd.forward(request, response); 54 } 55 56 public void endSimpleRender(WebResponse response) 57 throws Exception 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 |