mockdown 0.4.1

Mockdown is a single file and macro/dependency free mock library for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use std::any::Any;

use crate::Mock;

pub trait MockTimes: Mock {
    fn times<T: Any, U: Any>(&'static self, times: u8, expect: fn(T) -> U) -> &'static Self {
        for _ in 0..times {
            self.expect(expect);
        }
        self
    }
}