yup-hyper-mock 4.0.0

A utility library for testing clients using hyper

Contains various utility types and macros useful for testing hyper clients.


The mock_connector! and mock_connector_in_order! macros can be used to feed a client with preset data. That way you can control exactly what it will see, confining the test-case to its own sandbox that way.

All types they define are public to allow them to be used in other unit-tests. Please note that integration tests cannot share their mock types anyway, as each integration test goes into its own binary.


Set it up for use in tests in Cargo.toml

yup-hyper-mock = "*"
log = "*"  # log macros are used within yup-hyper-mock

Link it into your src/(lib.rs|main.rs)

#[cfg(test)] #[macro_use]
extern crate "yup-hyper-mock" as hyper_mock