pub struct ScenarioResult<E> { /* private fields */ }Expand description
Result of executing a command in a test scenario (the “Then” step).
Implementations§
Source§impl<E: PartialEq + Debug> ScenarioResult<E>
impl<E: PartialEq + Debug> ScenarioResult<E>
Sourcepub fn failed_with<Err: Into<CommandError>>(&self, expected: Err) -> &Self
pub fn failed_with<Err: Into<CommandError>>(&self, expected: Err) -> &Self
Assert the command failed with a specific error.
Accepts any error type that implements Into<CommandError>, matching
the same pattern used with the require! macro. The error is converted
to CommandError via Into and compared against the actual result.
Sourcepub fn then_events(&self, expected: Vec<E>) -> &Self
pub fn then_events(&self, expected: Vec<E>) -> &Self
Assert the events in the store match the expected list.
Sourcepub fn then_event_count(&self, expected: usize) -> &Self
pub fn then_event_count(&self, expected: usize) -> &Self
Assert the number of events in the store.
Auto Trait Implementations§
impl<E> Freeze for ScenarioResult<E>
impl<E> !RefUnwindSafe for ScenarioResult<E>
impl<E> Send for ScenarioResult<E>where
E: Send,
impl<E> Sync for ScenarioResult<E>where
E: Sync,
impl<E> Unpin for ScenarioResult<E>where
E: Unpin,
impl<E> UnsafeUnpin for ScenarioResult<E>
impl<E> !UnwindSafe for ScenarioResult<E>
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