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
42
43
44
45
46
47
48
49
50
51
52
53
//! Deterministic replay testing framework.
//!
//! This module provides a `TestContext` and associated mocking infrastructure
//! that enables reproducible tests by mocking external dependencies such as
//! time, HTTP requests, random number generation, and filesystem operations.
//!
//! # Overview
//!
//! The framework extends the existing `Context` with pluggable providers,
//! allowing tests to inject mocks while production code uses real implementations.
//!
//! # Example
//!
//! ```ignore
//! use xerv_core::testing::{TestContextBuilder, MockClock, MockHttp};
//! use serde_json::json;
//!
//! #[tokio::test]
//! async fn test_order_flow() {
//! let ctx = TestContextBuilder::new()
//! .with_fixed_time("2024-01-15T10:30:00Z")
//! .with_mock_http(
//! MockHttp::new()
//! .on_post("https://api.stripe.com/charges")
//! .respond_json(200, json!({"id": "ch_123", "status": "succeeded"}))
//! )
//! .with_seed(42)
//! .with_sequential_uuids()
//! .with_recording()
//! .build()
//! .unwrap();
//!
//! // Execute flow with test context
//! // Assert on outputs and recorded events
//! }
//! ```
// Re-export main types at module root
pub use ;
pub use ;
pub use ;
pub use ;
pub use assert_snapshot;