public class WSTestClient extends Object
Constructor and Description |
---|
WSTestClient() |
Modifier and Type | Method and Description |
---|---|
static WSClient |
newClient(int port)
Create a new WSClient for use in testing.
|
public static WSClient newClient(int port)
This client holds on to resources such as connections and threads, and so must be closed after use.
If the URL passed into the url method of this client is a host relative absolute path (that is, if it starts with /), then this client will make the request on localhost using the supplied port. This is particularly useful in test situations.
port
- The port to use on localhost when relative URLs are requested.