KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > wcf > web > CategoryTest


1 package com.tonbeller.wcf.web;
2
3 import java.io.IOException JavaDoc;
4
5 import javax.xml.transform.TransformerException JavaDoc;
6
7 import org.jaxen.JaxenException;
8 import org.xml.sax.SAXException JavaDoc;
9
10 import com.meterware.httpunit.GetMethodWebRequest;
11
12 public class CategoryTest extends HttpUnitTestCase {
13
14   public CategoryTest(String JavaDoc arg0) {
15     super(arg0);
16   }
17   
18   private void check(String JavaDoc name) throws JaxenException, IOException JavaDoc, SAXException JavaDoc, TransformerException JavaDoc {
19     utils.check(name, "filter.xsl", "form01");
20   }
21   
22   public void testTree() throws Exception JavaDoc {
23     wc.sendRequest(new GetMethodWebRequest(servletUrl + "/catdemo.jsp"));
24     check("cat-01");
25     
26     // 1.0 -> 2
27
utils.submitCell("form01", "catedit01", 1, 0, 0);
28     check("cat-02");
29     // swap 1.1 / 1.2
30
utils.submitCell("form01", "catedit01", 1, 0, 2);
31     check("cat-03");
32     
33   }
34
35 }
36
Popular Tags