Package play.test
Class WSTestClient
- Object
-
- play.test.WSTestClient
-
public class WSTestClient extends Object
-
-
Constructor Summary
Constructors Constructor Description WSTestClient()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static WSClient
newClient(int port)
Create a new WSClient for use in testing.
-
-
-
Method Detail
-
newClient
public static WSClient newClient(int port)
Create a new WSClient for use in testing.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.
- Parameters:
port
- The port to use on localhost when relative URLs are requested.- Returns:
- A running WS client.
-
-