pub struct BehaviorScenario {
pub schema_version: SchemaVersion,
pub id: String,
pub title: String,
pub contract_id: Option<String>,
pub given: Vec<String>,
pub when: Vec<String>,
pub then: Vec<String>,
pub tags: Vec<String>,
}Expand description
A BDD-style behavior scenario for readable intent documentation.
Behavior scenarios complement contracts by providing narrative descriptions of expected behavior, useful for acceptance testing and communicating intent to stakeholders.
Stored at specs/behavior/<id>.toml.
Fields§
§schema_version: SchemaVersion§id: StringUnique identifier for this scenario.
title: String§contract_id: Option<String>Optional contract this scenario relates to.
given: Vec<String>Preconditions (Given).
when: Vec<String>Actions (When).
then: Vec<String>Expected outcomes (Then).
Tags for categorization.
Trait Implementations§
Source§impl Clone for BehaviorScenario
impl Clone for BehaviorScenario
Source§fn clone(&self) -> BehaviorScenario
fn clone(&self) -> BehaviorScenario
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BehaviorScenario
impl Debug for BehaviorScenario
Source§impl<'de> Deserialize<'de> for BehaviorScenario
impl<'de> Deserialize<'de> for BehaviorScenario
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 BehaviorScenario
impl RefUnwindSafe for BehaviorScenario
impl Send for BehaviorScenario
impl Sync for BehaviorScenario
impl Unpin for BehaviorScenario
impl UnsafeUnpin for BehaviorScenario
impl UnwindSafe for BehaviorScenario
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