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
//! 现代化测试基础设施模块
//!
//! 提供类型安全的测试工具,消除测试中的 unwrap() 调用,建立清晰的测试模式。
//!
//! # 模块结构
//!
//! - [`assertions`]:类型安全的断言宏系统
//! - [`fixtures`]:统一的测试夹具和配置构建器
//! - [`mock_context`]:Mock 服务器配置和测试运行时
//!
//! # 使用示例
//!
//! ```rust,ignore
//! use openlark_core::testing::prelude::*;
//!
//! #[test]
//! fn test_example() {
//! let config = TestConfigBuilder::new().build();
//! let rt = TestRuntime::new();
//!
//! let result = rt.block_on(async { some_api().await });
//! let response = assert_res_ok!(result, "test_example");
//! assert_eq!(response.id, "123");
//! }
//! ```
/// 测试工具预置模块
///
/// 包含常用的测试配置构建器和运行时工具