Contains various utility types and macros useful for testing hyper clients.
Macros
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.
Usage
Set it up for use in tests in Cargo.toml
[]
= "*"
= "*" # log macros are used within yup-hyper-mock
Link it into your src/(lib.rs|main.rs)
extern crate "yup-hyper-mock" as hyper_mock