From 3aca959fcbfcc39a5b3ff53986831994eabd1395 Mon Sep 17 00:00:00 2001
From: GeWuYou <95328647+GeWuYou@users.noreply.github.com>
Date: Fri, 17 Apr 2026 17:06:55 +0800
Subject: [PATCH] =?UTF-8?q?docs(tests):=20=E4=B8=BA=E9=85=8D=E7=BD=AE?=
=?UTF-8?q?=E5=8A=A0=E8=BD=BD=E5=99=A8=E6=B5=8B=E8=AF=95=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E6=96=B9=E6=B3=95=E6=96=87=E6=A1=A3=E6=B3=A8=E9=87=8A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 为 BuildMonsterConfigYaml 方法添加 XML 文档注释
- 为 BuildMonsterSchema 方法添加 XML 文档注释
- 为 IndentLines 方法添加 XML 文档注释
- 补充参数和返回值说明信息
---
.../Config/YamlConfigLoaderAllOfTests.cs | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/GFramework.Game.Tests/Config/YamlConfigLoaderAllOfTests.cs b/GFramework.Game.Tests/Config/YamlConfigLoaderAllOfTests.cs
index 53089b81..09f0eebb 100644
--- a/GFramework.Game.Tests/Config/YamlConfigLoaderAllOfTests.cs
+++ b/GFramework.Game.Tests/Config/YamlConfigLoaderAllOfTests.cs
@@ -541,6 +541,11 @@ public sealed class YamlConfigLoaderAllOfTests
CreateConfigFile(relativePath, content);
}
+ ///
+ /// 构建带有指定奖励内容的怪物配置 YAML 文本。
+ ///
+ /// 奖励对象的 YAML 片段。
+ /// 完整的怪物配置 YAML 文本。
private static string BuildMonsterConfigYaml(string rewardYaml)
{
return $$"""
@@ -550,6 +555,12 @@ public sealed class YamlConfigLoaderAllOfTests
""";
}
+ ///
+ /// 构建带有指定奖励属性和 allOf 约束的怪物 schema JSON。
+ ///
+ /// 奖励对象的 properties JSON 片段。
+ /// allOf 约束的 JSON 数组片段。
+ /// 完整的 schema JSON 文本。
private static string BuildMonsterSchema(
string rewardPropertiesJson,
string allOfJson)
@@ -570,6 +581,12 @@ public sealed class YamlConfigLoaderAllOfTests
""";
}
+ ///
+ /// 为多行文本的每一行添加指定数量的空格缩进。
+ ///
+ /// 原始文本。
+ /// 缩进空格数。
+ /// 添加缩进后的文本。
private static string IndentLines(string text, int indentLevel)
{
var indentation = new string(' ', indentLevel);