Struct galvanic_mock_lib::ExpectBehaviour
[−]
[src]
pub struct ExpectBehaviour { pub stmt_id: usize, pub bound: Rc<Any>, // some fields omitted }
Stores the state of a expected behaviour.
Fields
stmt_id: usize
The unique id of the behaviour within the mocked method to which it belongs.
bound: Rc<Any>
The bound variables available to the behaviour's ArgMatcher
.
Methods
impl ExpectBehaviour
[src]
fn with_times(
times: usize,
stmt_id: usize,
bound: Rc<Any>,
stmt_repr: &str
) -> Self
[src]
times: usize,
stmt_id: usize,
bound: Rc<Any>,
stmt_repr: &str
) -> Self
Creates a new behaviour which is satisfied if matched times
.
fn with_at_least(
at_least_times: usize,
stmt_id: usize,
bound: Rc<Any>,
stmt_repr: &str
) -> Self
[src]
at_least_times: usize,
stmt_id: usize,
bound: Rc<Any>,
stmt_repr: &str
) -> Self
Creates a new behaviour which is satisfied if matched at_least_times
.
fn with_at_most(
at_most_times: usize,
stmt_id: usize,
bound: Rc<Any>,
stmt_repr: &str
) -> Self
[src]
at_most_times: usize,
stmt_id: usize,
bound: Rc<Any>,
stmt_repr: &str
) -> Self
Creates a new behaviour which is satisfied if matched at_most_times
.
fn with_between(
at_least_times: usize,
at_most_times: usize,
stmt_id: usize,
bound: Rc<Any>,
stmt_repr: &str
) -> Self
[src]
at_least_times: usize,
at_most_times: usize,
stmt_id: usize,
bound: Rc<Any>,
stmt_repr: &str
) -> Self
Creates a new behaviour which is satisfied if matched between [at_least_times, at_most_times]
(inclusive endpoints).
fn matched(&self)
[src]
Notifies the behaviour that it has been matched.
fn is_saturated(&self) -> bool
[src]
Returns true
iff current number of matches would satify the behaviours expected repetitions.
fn describe(&self) -> &str
[src]
Returns a description of the behaviour.