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
54
55
56
//! Test utilities for auths-core.
//!
//! This module provides in-memory implementations of key storage
//! and builders for creating test identities.
//!
//! # Feature Flag
//!
//! This module is only available when the `test-utils` feature is enabled:
//!
//! ```toml
//! [dev-dependencies]
//! auths_core = { version = "0.0.2", features = ["test-utils"] }
//! ```
//!
//! # Quick Start
//!
//! ```rust,ignore
//! use auths_core::testing::{get_test_memory_keychain, MemoryStorage, MemoryKeychainHandle};
//! use auths_core::storage::KeyStorage;
//!
//! // Get a fresh, cleared in-memory keychain for testing
//! let keychain = get_test_memory_keychain();
//!
//! // Use it like any other KeyStorage implementation
//! keychain.store_key("test-alias", &identity_did, &encrypted_data)?;
//! let (did, data) = keychain.load_key("test-alias")?;
//! ```
//!
//! # Components
//!
//! - [`MemoryStorage`] - The underlying in-memory storage struct
//! - [`MemoryKeychainHandle`] - A handle implementing [`KeyStorage`] trait
//! - [`get_test_memory_keychain`] - Factory function returning a cleared keychain
//! - [`TestIdentityBuilder`] - Fluent builder for creating test identities
//! - [`TestPassphraseProvider`] - Mock passphrase provider for tests
//!
//! [`KeyStorage`]: crate::storage::KeyStorage
// Re-export test utilities from storage::memory
pub use crate;
// Re-export builder types
pub use ;
// Re-export deterministic UUID provider and in-memory storage
pub use DeterministicUuidProvider;
pub use FakeConfigStore;
pub use InMemoryStorage;