pub struct MockBoo { /* private fields */ }
Expand description
Mock of a struct
Structs can be mocked with mock!
.
Their mock methods have an identical API to the methods generated by
#[automock]
.
Implementations§
source§impl MockBoo
impl MockBoo
sourcepub fn checkpoint(&mut self)
pub fn checkpoint(&mut self)
Validate that all current expectations for all methods have been satisfied, and discard them.
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new mock object with no expectations.
This method will not be generated if the real struct
already has a new
method. However, it will be
generated if the struct implements a trait with a new
method. The trait’s new
method can still be called
like <MockX as TraitY>::new
source§impl MockBoo
impl MockBoo
sourcepub fn expect_bah(&mut self) -> &mut Expectation
👎Deprecated since 0.9.0: Deprecated mock! syntax. Instead of “trait X”, write “impl X for Y”. See PR #205
pub fn expect_bah(&mut self) -> &mut Expectation
Create an Expectation
for mocking the bah
method