1 16 package org.apache.myfaces.renderkit.html; 17 18 import org.apache.myfaces.cactus.JspBasedTestCase; 19 20 import com.meterware.httpunit.WebResponse; 21 import com.meterware.httpunit.WebConversation; 22 import com.meterware.httpunit.WebForm; 23 import com.meterware.httpunit.SubmitButton; 24 25 26 29 public class Bug1050122CactusTest 30 extends JspBasedTestCase 31 { 32 33 public Bug1050122CactusTest(String string) 34 { 35 super(string); 36 } 37 38 39 public void endBug(WebResponse response) 40 throws Exception 41 { 42 WebConversation conversation = new WebConversation(); 43 response = conversation.getResponse(response.getURL().toExternalForm()); 44 WebForm form = response.getFormWithID("testForm"); 45 form.setParameter("testForm:size", "12"); 46 SubmitButton submitButton = form.getSubmitButtonWithID("testForm:submit"); 47 response = form.submit(submitButton); 48 49 assertTrue(response.getText().indexOf("12class java.lang.Long") != -1); 51 } 52 } 53 | Popular Tags |