KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > jwebunit > TestServer


1 package net.sourceforge.jwebunit;
2
3 import java.io.IOException JavaDoc;
4
5 import com.meterware.pseudoserver.HttpUserAgentTest;
6 import com.meterware.pseudoserver.PseudoServlet;
7 import com.meterware.httpunit.WebConversation;
8
9 /**
10  * Contributed by
11  * @author Archie Cowan (archiec at users.sourceforge.net)
12  *
13  */

14 public class TestServer extends HttpUserAgentTest {
15
16     static {
17         new WebConversation();
18     }
19
20     public TestServer() {
21         super("TestServer");
22     }
23
24     public void defineWebPage(String JavaDoc name, String JavaDoc body) {
25         super.defineWebPage(name, body);
26     }
27
28     public void defineResource(String JavaDoc name, String JavaDoc value) {
29         super.defineResource(name, value);
30     }
31
32     public void defineResource(String JavaDoc name, PseudoServlet servlet) {
33         super.defineResource(name, servlet);
34     }
35
36     public int getConnectedPort() throws IOException JavaDoc {
37         return getHostPort();
38     }
39     
40     public String JavaDoc getHostPath() {
41         return super.getHostPath();
42     }
43
44     public void setUp() throws Exception JavaDoc {
45         super.setUp();
46         Thread.sleep(50);
47     }
48
49     public void tearDown() throws Exception JavaDoc {
50         super.tearDown();
51     }
52 }
53
Popular Tags