Struct modelator::tester::SystemTester
source · [−]pub struct SystemTester<State> { /* private fields */ }
Expand description
SystemTester
is similar to SimpleTester
, but allows to
supply test functions that accept also modifiable system state.
Implementations
pub fn add<T, F, R>(&mut self, test: F) where
T: 'static + DeserializeOwned + UnwindSafe + Clone,
F: FnMut(&mut State, T) -> R + 'static,
R: 'static + Serialize,
pub fn add<T, F, R>(&mut self, test: F) where
T: 'static + DeserializeOwned + UnwindSafe + Clone,
F: FnMut(&mut State, T) -> R + 'static,
R: 'static + Serialize,
Add a test function to the tester.
Add to the tester a test function that can accept closures as input.
Run the test functions on the provided system and input.
The first test function that is able to handle this kind of input,
will produce the result. If none of the defined test functions is
able to handle the input, the unhandled
result will be returned.
Trait Implementations
Auto Trait Implementations
impl<State> !RefUnwindSafe for SystemTester<State>
impl<State> !Send for SystemTester<State>
impl<State> !Sync for SystemTester<State>
impl<State> Unpin for SystemTester<State>
impl<State> !UnwindSafe for SystemTester<State>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more