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 TreeTest extends HttpUnitTestCase { 14 15 public TreeTest(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 testTree() throws Exception { 24 wc.sendRequest(new GetMethodWebRequest(servletUrl + "/treedemo.jsp")); 25 check("tree-01"); 26 27 WebForm wf = wc.getCurrentPage().getFormWithID("form01"); 28 utils.submitCell("form01", "tree01", 0, 0, 1); 30 check("tree-02"); 31 utils.submitCell("form01", "tree01", 0, 0, 0); 33 check("tree-03"); 34 35 utils.setCheckBox("form01", "tree01", 2, 0, 0, true); 37 utils.submitCell("form01", "tree01", 3, 0, 0); 39 check("tree-04"); 40 41 utils.setCheckBox("form01", "tree01", 3, 0, 0, true); 43 utils.submitCell("form01", "tree01", 3, 0, 1); 45 check("tree-05"); 46 47 utils.submitCell("form01", "tree01", 0, 0, 0); 49 utils.submitCell("form01", "tree01", 1, 0, 0); 51 utils.submitCell("form01", "tree01", 4, 0, 3); 53 check("tree-06"); 54 55 } 56 57 } 58 | Popular Tags |