pub struct Scenario { /* private fields */ }
Expand description
An acceptance test scenario.
A scenario consists of a title, by which it can be identified, and a sequence of steps. The Scenario struct assumes the steps are valid and make sense; the struct does not try to validate the sequence.
Implementations§
Source§impl Scenario
impl Scenario
Sourcepub fn new(title: &str, origin: Location) -> Scenario
pub fn new(title: &str, origin: Location) -> Scenario
Construct a new scenario.
The new scenario will have a title, but no steps.
Sourcepub fn has_label(&self, label: &str) -> bool
pub fn has_label(&self, label: &str) -> bool
Check if a given label is present on this scenario
Sourcepub fn steps(&self) -> &[ScenarioStep]
pub fn steps(&self) -> &[ScenarioStep]
Return slice with all the steps.
Sourcepub fn add(&mut self, step: &ScenarioStep)
pub fn add(&mut self, step: &ScenarioStep)
Add a step to a scenario.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Scenario
impl<'de> Deserialize<'de> for Scenario
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Scenario
impl RefUnwindSafe for Scenario
impl Send for Scenario
impl Sync for Scenario
impl Unpin for Scenario
impl UnwindSafe for Scenario
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more