Struct modelator::event::EventRunner [−][src]
pub struct EventRunner<System: Debug> { /* fields omitted */ }
Expand description
A runner that allows to run tests specified as event streams
against the given concrete system.
You can implement several instances of StateHandlers
and ActionHandlers for the System
, thus allowing your system
to handle several kinds of abstract states or actions.
Implementations
pub fn with_state<State>(self) -> Self where
State: 'static + DeserializeOwned + UnwindSafe + Clone + Debug + PartialEq,
System: 'static + StateHandler<State>,
pub fn with_state<State>(self) -> Self where
State: 'static + DeserializeOwned + UnwindSafe + Clone + Debug + PartialEq,
System: 'static + StateHandler<State>,
Equip the runner with the ability to handle given abstract State
.
pub fn with_action<Action>(self) -> Self where
Action: 'static + DeserializeOwned + UnwindSafe + Clone,
System: 'static + ActionHandler<Action>,
<System as ActionHandler<Action>>::Outcome: 'static + Serialize,
pub fn with_action<Action>(self) -> Self where
Action: 'static + DeserializeOwned + UnwindSafe + Clone,
System: 'static + ActionHandler<Action>,
<System as ActionHandler<Action>>::Outcome: 'static + Serialize,
Equip the runner with the ability to handle given abstract Action
.
Run the runner on:
- the given concrete
system
, which provides storage of concrete system states, as well as the handling of the abstract states and actions; - the given stream of events, representing the test.
Returns the test result.