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
//! Tests for cfgmatic-source crate.
//!
//! This module contains all tests organized by layer:
//!
//! - `domain` - Domain layer tests (entities, traits)
//! - `application` - Application layer tests (services)
//! - `infrastructure` - Infrastructure layer tests (implementations)
//! - `integration` - End-to-end integration tests
//!
//! # Test Organization
//!
//! Tests follow the same layered architecture as the source code:
//!
//! ```text
//! tests/
//! ├── mod.rs # Root test module
//! ├── domain/ # Domain layer tests
//! │ ├── mod.rs
//! │ ├── source_tests.rs
//! │ ├── format_tests.rs
//! │ └── content_tests.rs
//! ├── application/ # Application layer tests
//! │ ├── mod.rs
//! │ └── loader_tests.rs
//! ├── infrastructure/ # Infrastructure layer tests
//! │ ├── mod.rs
//! │ ├── file_source_tests.rs
//! │ ├── env_source_tests.rs
//! │ ├── memory_source_tests.rs
//! │ └── composite_source_tests.rs
//! └── integration/ # End-to-end tests
//! ├── mod.rs
//! └── workflow_tests.rs
//! ```
//!
//! # Running Tests
//!
//! ```bash
//! # Run all tests
//! cargo test
//!
//! # Run specific layer tests
//! cargo test --test domain
//! cargo test --test infrastructure
//!
//! # Run with features
//! cargo test --features "file env toml json"
//! ```