mockiato 0.9.6

A strict, yet friendly mocking library for Rust 2018
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use mockiato::mockable;
use std::collections::HashMap;

#[mockable]
trait Foo {
    fn bar(&self, hashmap: &HashMap<usize, usize>);
}

#[test]
fn works_with_hashmap() {
    let mut mock = FooMock::new();

    mock.expect_bar(|arg| arg.partial_eq_owned(HashMap::new()))
        .times(1)
        .returns(());

    mock.bar(&HashMap::new());
}