pub struct Suite {
pub name: String,
pub vocabulary: Vocabulary,
pub background: Condition,
pub background_steps: Vec<StepText>,
pub sections: Vec<Section>,
pub features: Vec<Feature>,
pub expectations: Vec<Expectation>,
pub stories: Vec<Story>,
pub glossary: Vec<Term>,
pub sources: Sources,
pub platforms: Vec<String>,
pub platform: Option<String>,
}Expand description
A whole suite: the vocabulary, its sections (the first is the root), and the expectations and stories written against them.
Fields§
§name: String§vocabulary: Vocabulary§background: ConditionThe root section’s start, which every section builds on.
background_steps: Vec<StepText>§sections: Vec<Section>§features: Vec<Feature>§expectations: Vec<Expectation>§stories: Vec<Story>§glossary: Vec<Term>Term:s: the glossary’s definitions.
sources: Sources§platforms: Vec<String>Platform:s the suite is run on; the first is the default, which untagged lines are about.
platform: Option<String>The platform this suite was read for (a lens on one platform’s variants), if the suite declares platforms.
Implementations§
Source§impl Suite
impl Suite
pub fn exp(&self, id: ExpId) -> &Expectation
pub fn feature(&self, id: FeatureId) -> &Feature
pub fn story(&self, id: StoryId) -> &Story
pub fn section(&self, id: SectionId) -> &Section
Sourcepub fn section_of(&self, e: ExpId) -> &Section
pub fn section_of(&self, e: ExpId) -> &Section
The section an expectation belongs to (its feature’s).
pub fn describe(&self, c: &Condition) -> String
Sourcepub fn describe_trigger(&self, t: &Trigger) -> String
pub fn describe_trigger(&self, t: &Trigger) -> String
“the user presses reset”, “the dial is above 55 %”, or both.
Sourcepub fn transitions(&self) -> impl Iterator<Item = &Expectation>
pub fn transitions(&self) -> impl Iterator<Item = &Expectation>
Transitions (expectations with a trigger), in declaration order.
pub fn invariants(&self) -> impl Iterator<Item = &Expectation>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Suite
impl RefUnwindSafe for Suite
impl Send for Suite
impl Sync for Suite
impl Unpin for Suite
impl UnsafeUnpin for Suite
impl UnwindSafe for Suite
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