Struct finchers::test::TestRunner[][src]

pub struct TestRunner<E> { /* fields omitted */ }

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

It uses internally the current thread version of Tokio runtime for executing asynchronous processes.

Methods

impl<E> TestRunner<E>
[src]

Create a TestRunner from the specified endpoint.

Create a TestRunner from the specified endpoint with a Tokio runtime.

Returns a reference to the header map, whose values are set before applying the request to endpoint.

Returns a reference to the instance of Endpoint owned by this runner.

Returns a reference to the Tokio runtime managed by this runner.

Applies the given request to the inner endpoint and retrieves the result of returned future.

This method is available only if the output of endpoint is a tuple with a single element. If the output type is an unit or the tuple contains more than one element, use apply_raw instead.

Applies the given request to the inner endpoint and retrieves the result of returned future without peeling tuples.

Applies the given request to the endpoint and convert the result into an HTTP response sent to the client.

Trait Implementations

impl<E: Debug> Debug for TestRunner<E>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<E> !Send for TestRunner<E>

impl<E> !Sync for TestRunner<E>