[][src]Module finchers::test

The basic facilities for testing endpoints.

Example


// A user-defined type which does not implement `Output`.
struct Credential;
let endpoint = endpoint::unit().map(|| Credential);

let mut runner = test::runner(endpoint);

let result: Result<Credential, _> = runner.apply("/");

assert!(result.is_ok());

Structs

ReqBody
TestRunner

A test runner for emulating the behavior of endpoints in the server.

Traits

IntoReqBody

A trait representing the conversion into a message body in HTTP requests.

TestRequest

A trait representing the conversion into an HTTP request.

Functions

runner

A helper function for creating a new TestRunner from the specified endpoint.