pub struct TestScenario { /* private fields */ }Expand description
Builder for Given-When-Then command tests.
Implementations§
Source§impl TestScenario
impl TestScenario
Sourcepub async fn given_events<E: Event>(
self,
stream_id: StreamId,
events: Vec<E>,
) -> Self
pub async fn given_events<E: Event>( self, stream_id: StreamId, events: Vec<E>, ) -> Self
Seed events into a stream as preconditions (the “Given” step).
Sourcepub async fn when<C>(self, command: C) -> ScenarioResult<C::Event>
pub async fn when<C>(self, command: C) -> ScenarioResult<C::Event>
Execute a command (the “When” step). Returns a result for assertions.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for TestScenario
impl RefUnwindSafe for TestScenario
impl Send for TestScenario
impl Sync for TestScenario
impl Unpin for TestScenario
impl UnsafeUnpin for TestScenario
impl UnwindSafe for TestScenario
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