1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Testing utilities for EventCore backends and commands.
//!
//! This crate provides helpers for verifying that `EventStore` implementations
//! satisfy their behavioral contracts, injecting failures for chaos and retry
//! testing, and writing readable Given-When-Then command tests.
//!
//! # Modules
//!
//! - [`contract`] — Behavioral contract tests via the `backend_contract_tests!`
//! macro. Run these against any `EventStore` implementation to verify it
//! upholds all required guarantees (optimistic concurrency, atomicity,
//! ordering, etc.).
//!
//! - [`chaos`] — [`ChaosEventStore`]: wraps an `EventStore` and injects
//! probabilistic failures. Use for chaos testing to verify that command
//! retry logic handles transient errors correctly.
//!
//! - [`deterministic`] — [`DeterministicConflictStore`]: injects predictable
//! stream-version conflicts on the first write attempt, then succeeds on
//! retry. Use for deterministic testing of the automatic retry path in
//! `eventcore::execute()`.
//!
//! - [`event_collector`] — [`EventCollector`]: a `Projector` implementation
//! that accumulates every event it sees into a `Vec`. Use in assertions to
//! confirm which events were written to the store.
//!
//! - [`scenario`] — [`TestScenario`]: a Given-When-Then builder for command
//! tests. Seed the store with prior events (Given), execute a command
//! (When), and assert on the resulting events or error (Then).
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;