Expand description
Minimal library for creating mock objects by hand using stable Rust.
This crate is a facade that just re-exports any crates necessary to both create and use mock objects in Simulacrum.
Modules§
- constraint
- expectation
- macros
- method
- This is the API that you’ll call in your tests when using your Mock objects.
- mock
- Mock object internals. You can use this API to construct mock objects manually.
- validators
- Types that impl
Validator
.
Macros§
- create_
expect_ method - Use this macro to create an
.expect_METHOD_NAME()
method. - create_
mock - create_
mock_ struct - params
- Use this macro to create a
Validator
that works for methods with 2-9 parameters. - simulacrum_
tuplefy - was_
called - Use this macro to do a
self.e.was_called
self.e.was_called_returning
with a shorter interface.
Structs§
- Expectations
- Method
- What you get from calling
.expect_METHOD_NAME()
on a Mock. - Tuple2
- Tuple3
- Tuple4
- Tuple5
- Tuple6
- Tuple7
- Tuple8
- Tuple9
Functions§
- any
- deref
- gt
- Parameter(s) must be > the provided value.
- lt
- Parameter(s) must be < the provided value.
- none
- passes
Type Aliases§
- Expectation
Id - The keys used in a
HandleBox
. A typedef foru32
. - Method
Name