[][src]Module gotham::test

Contains helpers for Gotham applications to use during testing.

See the TestServer type for example usage.

Structs

TestClient

Client interface for issuing requests to a TestServer.

TestRequest

Builder API for constructing TestServer requests. When the request is built, RequestBuilder::perform will issue the request and provide access to the response.

TestResponse

Wrapping struct for the Response returned by a TestClient. Provides access to the Response value via the Deref and DerefMut traits, and also provides a function for awaiting a completed response body.

TestServer

The TestServer type, which is used as a harness when writing test cases for Hyper services (which Gotham's Router is). An instance of TestServer is run asynchronously within the current thread, and is only accessible by a client returned from the TestServer.