mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-23 11:14:30 +08:00
- 将IocContainer的Init方法重命名为OnContextReady并设为protected override - 重构AbstractModel中的Architecture字段为_context属性并实现IContextAware接口 - 移除GetArchitecture和SetArchitecture方法,添加GetContext和SetContext方法 - 为IModel接口添加IContextAware继承 - 添加TestArchitecture、TestModel和TestSystem测试类 - 创建ArchitectureInitializationTests测试用例验证组件初始化 - 更新项目文件添加NUnit包引用和测试项目配置 - 在解决方案文件中添加测试项目引用
18 lines
420 B
C#
18 lines
420 B
C#
using GFramework.Core.architecture;
|
|
using GFramework.Core.Tests.model;
|
|
using GFramework.Core.Tests.system;
|
|
|
|
namespace GFramework.Core.Tests.architecture;
|
|
|
|
public sealed class TestArchitecture : Architecture
|
|
{
|
|
public bool InitCalled { get; private set; }
|
|
|
|
protected override void Init()
|
|
{
|
|
InitCalled = true;
|
|
|
|
RegisterModel(new TestModel());
|
|
RegisterSystem(new TestSystem());
|
|
}
|
|
} |