Module gotham::test

source ·
Expand description

Contains helpers for Gotham applications to use during testing.

See the TestServer type for example usage.

Structs

Client interface for issuing requests to a TestServer.
Builder API for constructing TestServer requests. When the request is built, RequestBuilder::perform will issue the request and provide access to the response.
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.
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.