1 16 package org.apache.myfaces.renderkit.html; 17 18 import javax.servlet.RequestDispatcher ; 19 20 import org.apache.cactus.ServletTestCase; 21 22 import com.meterware.httpunit.SubmitButton; 23 import com.meterware.httpunit.WebConversation; 24 import com.meterware.httpunit.WebForm; 25 import com.meterware.httpunit.WebResponse; 26 27 28 48 public class Bug978654CactusTest 49 extends ServletTestCase 50 { 51 public Bug978654CactusTest(String name) { 52 super(name); 53 } 54 55 public void testBug() throws Exception 56 { 57 RequestDispatcher rd = config.getServletContext().getRequestDispatcher( 58 "/Bug978654CactusTest.jsf"); 59 rd.forward(request, response); 61 } 62 63 public void endBug948626(WebResponse response) 64 throws Exception 65 { 66 WebConversation conversation = new WebConversation(); 67 response = conversation.getResponse(response.getURL().toExternalForm()); 68 WebForm form = response.getFormWithID("testForm"); 69 SubmitButton submitButton = form.getSubmitButtonWithID("testForm:submit"); 70 assertEquals("", form.getParameterValue("testForm:hidden")); 71 response = form.submit(submitButton); 72 form = response.getFormWithID("testForm"); 73 assertEquals("", form.getParameterValue("testForm:hidden")); 74 } 75 } 76 | Popular Tags |