mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 19:03:29 +08:00
- 创建 AsyncTestArchitecture 类用于异步测试 - 添加 AsyncTestSystem 实现异步初始化系统 - 创建 ArchitectureTestsBase 基类统一同步异步测试逻辑 - 实现 AsyncArchitectureTests 异步架构测试用例 - 将同步测试重构为继承自 ArchitectureTestsBase - 移除重复的测试方法实现 - 重命名模型初始化状态属性为 Initialized
40 lines
862 B
C#
40 lines
862 B
C#
using GFramework.Core.Abstractions.architecture;
|
|
using GFramework.Core.Abstractions.enums;
|
|
using GFramework.Core.Abstractions.model;
|
|
|
|
namespace GFramework.Core.Tests.model;
|
|
|
|
/// <summary>
|
|
/// 测试模型类,用于框架测试目的
|
|
/// </summary>
|
|
public sealed class TestModel : IModel
|
|
{
|
|
private IArchitectureContext _context = null!;
|
|
|
|
/// <summary>
|
|
/// 获取模型是否已初始化的状态
|
|
/// </summary>
|
|
public bool Initialized { get; private set; }
|
|
|
|
/// <summary>
|
|
/// 初始化模型
|
|
/// </summary>
|
|
public void Init()
|
|
{
|
|
Initialized = true;
|
|
}
|
|
|
|
public void SetContext(IArchitectureContext context)
|
|
{
|
|
_context = context;
|
|
}
|
|
|
|
public IArchitectureContext GetContext()
|
|
{
|
|
return _context;
|
|
}
|
|
|
|
public void OnArchitecturePhase(ArchitecturePhase phase)
|
|
{
|
|
}
|
|
} |