1 16 package org.apache.myfaces.taglib.html; 17 18 import com.meterware.httpunit.WebForm; 19 import com.meterware.httpunit.WebResponse; 20 import org.w3c.dom.Node ; 21 import org.w3c.dom.NodeList ; 22 23 import org.apache.cactus.ServletTestCase; 24 25 import javax.servlet.RequestDispatcher ; 26 27 41 public class HtmlInputHiddenTagCactusTest 42 extends ServletTestCase 43 { 44 46 public HtmlInputHiddenTagCactusTest(String name) { 47 super(name); 48 } 49 50 public void testSimpleRender() throws Exception { 51 RequestDispatcher rd = config.getServletContext().getRequestDispatcher( 52 "/HtmlInputHiddenTagCactusTest.jsf"); 53 rd.forward(request, response); 55 } 56 57 public void endSimpleRender(WebResponse response) 58 throws Exception 59 { 60 WebForm form = response.getFormWithID("testForm"); 61 Node node = form.getDOMSubtree(); 62 NodeList lst = node.getChildNodes(); 63 for (int i = 0, len = lst.getLength(); i < len; i++) 64 { 65 Node child = lst.item(i); 66 System.out.println(child.getNodeName()); 67 } 68 } 69 } 70 | Popular Tags |