Module gotham::plain::test[][src]

Expand description

Contains helpers for Gotham applications to use during testing.

See the TestServer and AsyncTestServer types for example usage.

Structs

An AsyncTestServer, that can be used for testing requests against a server in asynchronous contexts. The AsyncTestServer runs in the runtime where it is created and an AsyncTestClient can be created to make asynchronous requests to it.

TestConnect represents the connection between a test client and the TestServer instance that created it. This type should never be used directly.

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.