refactor(config): 更新Godot YAML配置加载器的命名空间引用

- 为Godot.FileAccess添加using别名以避免冲突
- 添加GFramework.Game.Config命名空间引用
- 添加NUnit.Framework测试框架引用
- 优化配置加载器的依赖管理
- 提升代码可读性和维护性
- 确保测试类的正确引用关系
This commit is contained in:
GeWuYou 2026-04-10 23:10:06 +08:00
parent 40f5fd34b7
commit 0ea3c0ad9d
2 changed files with 7 additions and 4 deletions

View File

@ -2,7 +2,9 @@ using System;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using GFramework.Game.Config;
using GFramework.Godot.Config; using GFramework.Godot.Config;
using NUnit.Framework;
namespace GFramework.Godot.Tests.Config; namespace GFramework.Godot.Tests.Config;
@ -12,10 +14,6 @@ namespace GFramework.Godot.Tests.Config;
[TestFixture] [TestFixture]
public sealed class GodotYamlConfigLoaderTests public sealed class GodotYamlConfigLoaderTests
{ {
private string _resourceRoot = null!;
private string _testRoot = null!;
private string _userRoot = null!;
/// <summary> /// <summary>
/// 为每个测试准备独立的资源根目录与用户目录。 /// 为每个测试准备独立的资源根目录与用户目录。
/// </summary> /// </summary>
@ -44,6 +42,10 @@ public sealed class GodotYamlConfigLoaderTests
} }
} }
private string _resourceRoot = null!;
private string _testRoot = null!;
private string _userRoot = null!;
/// <summary> /// <summary>
/// 验证导出态会把注册过的 YAML 与 schema 文本同步到运行时缓存,再交给底层加载器。 /// 验证导出态会把注册过的 YAML 与 schema 文本同步到运行时缓存,再交给底层加载器。
/// </summary> /// </summary>

View File

@ -3,6 +3,7 @@ using GFramework.Core.Abstractions.Events;
using GFramework.Game.Abstractions.Config; using GFramework.Game.Abstractions.Config;
using GFramework.Game.Config; using GFramework.Game.Config;
using GFramework.Godot.Extensions; using GFramework.Godot.Extensions;
using FileAccess = Godot.FileAccess;
namespace GFramework.Godot.Config; namespace GFramework.Godot.Config;