Expand description
Mock implementation of DurableServiceClient for testing.
This module provides a mock checkpoint client that can be used for unit testing durable functions without requiring AWS infrastructure.
§Examples
use durable_execution_sdk_testing::MockDurableServiceClient;
use durable_execution_sdk::{CheckpointResponse, Operation, OperationType};
// Create a mock client with default responses
let client = MockDurableServiceClient::new();
// Create a mock client with custom checkpoint responses
let client = MockDurableServiceClient::new()
.with_checkpoint_response(Ok(CheckpointResponse::new("token-1")))
.with_checkpoint_response(Ok(CheckpointResponse::new("token-2")));
// Create a mock client with multiple default responses
let client = MockDurableServiceClient::new()
.with_checkpoint_responses(5);Structs§
- Checkpoint
Call - Record of a checkpoint call made to the mock client.
- GetOperations
Call - Record of a get_operations call made to the mock client.
- Mock
Durable Service Client - Mock implementation of DurableServiceClient for testing.