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
//! Testing utilities for durable Lambda handlers.
//!
//! This crate provides [`MockDurableContext`](mock_context::MockDurableContext) for
//! writing tests without AWS credentials. Pre-load step results and verify
//! handler logic with deterministic, in-memory data.
//!
//! # Quick Start
//!
//! ```no_run
//! use durable_lambda_testing::prelude::*;
//!
//! #[tokio::test]
//! async fn test_my_handler() {
//! let (mut ctx, calls, _ops) = MockDurableContext::new()
//! .with_step_result("validate", r#"true"#)
//! .build()
//! .await;
//!
//! let result: Result<bool, String> = ctx.step("validate", || async {
//! panic!("not executed during replay");
//! }).await.unwrap();
//!
//! assert!(result.unwrap());
//! assert_no_checkpoints(&calls).await;
//! }
//! ```
pub use ;
pub use MockDurableContext;