Futures MockStream

MockStream for futures crate Async{Read, Write} and Stream traits


Tests status docs.rs docs

Install

Install from crates.io

[dependencies] futures-mockstream = "0.1"

Example

with smol

```rust use futures-mockStream::MockStream; use smol;

[cfg(test)]

mod tests { #[test] fn asyncread() { smol::run(async { let mut mockstream = MockStream::from(&b"GET /index HTTP/1.1\r\n"); while let Some(resp) = MyConn::withstream(mockstream).next().await { match resp { Ok(r) => { // your asserts }, Err(e) => {}, } } }) } } ```