mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 19:03:29 +08:00
- 移除 Architecture 类中关于业务操作方法的注释说明 - 更新 AsyncTestModel 继承 AbstractModel 并移除上下文设置相关方法 - 添加 ITestModel 接口定义用于测试模型 - 在 SyncArchitectureTests 中添加事件接收和取消注册功能测试 - 创建 TestEvent 和 EmptyEvent 用于事件系统测试 - 修改 TestModel 继承 AbstractModel 并实现 ITestModel 接口 - 添加 TestQuery 类用于测试查询操作功能 - [skip ci]
36 lines
737 B
C#
36 lines
737 B
C#
using GFramework.Core.Abstractions.enums;
|
|
using GFramework.Core.model;
|
|
|
|
namespace GFramework.Core.Tests.model;
|
|
|
|
/// <summary>
|
|
/// 测试模型类,用于框架测试目的
|
|
/// </summary>
|
|
public sealed class TestModel : AbstractModel, ITestModel
|
|
{
|
|
public const int DefaultXp = 5;
|
|
|
|
/// <summary>
|
|
/// 获取模型是否已初始化的状态
|
|
/// </summary>
|
|
public bool Initialized { get; private set; }
|
|
|
|
/// <summary>
|
|
/// 初始化模型
|
|
/// </summary>
|
|
public void Init()
|
|
{
|
|
Initialized = true;
|
|
}
|
|
|
|
|
|
public void OnArchitecturePhase(ArchitecturePhase phase)
|
|
{
|
|
}
|
|
|
|
public int GetCurrentXp { get; } = DefaultXp;
|
|
|
|
protected override void OnInit()
|
|
{
|
|
}
|
|
} |