| 1 package com.tonbeller.wcf.web; 2 3 import java.io.IOException ; 4 5 import javax.xml.transform.TransformerException ; 6 7 import org.jaxen.JaxenException; 8 import org.xml.sax.SAXException ; 9 10 import com.meterware.httpunit.GetMethodWebRequest; 11 import com.meterware.httpunit.WebForm; 12 13 public class TableFormTest extends HttpUnitTestCase { 14 15 public TableFormTest(String arg0) { 16 super(arg0); 17 } 18 19 private void check(String name) throws JaxenException, IOException , SAXException , TransformerException { 20 utils.check(name, "filter.xsl", "form01"); 21 } 22 23 public void testTable() throws Exception { 24 wc.sendRequest(new GetMethodWebRequest(servletUrl + "/tableform.jsp")); 25 check("tableform-01"); 26 27 WebForm wf = utils.getForm("form01"); 29 wf.setParameter("string", "string 2"); 30 utils.submitCell("form01", "tableform.table", 0, 2, 0); 31 check("tableform-02"); 32 33 wf = utils.getForm("form01"); 35 wf.setParameter("string", "string 3"); 36 utils.submitCell("form01", "tableform.table", 0, 0, 0); 37 check("tableform-03"); 38 39 wf = utils.getForm("form01"); 41 wf.setParameter("string", "string 4"); 42 utils.submitCell("form01", "tableform.table", 11, 0, 1); 43 check("tableform-04"); 44 45 } 46 47 } 48 | Popular Tags |