添加教师树
ci / build-test (push) Failing after 2m18s
ci / publish (push) Skipped

This commit is contained in:
wanghu
2026-09-08 16:30:00 +08:00
parent 2414f8b94b
commit 4226b042a8
5 changed files with 60 additions and 28 deletions
@@ -77,6 +77,28 @@ public class SchClassLiveDebugTests(ITestOutputHelper output)
}
}
[Fact]
public async Task 联调_教师组树()
{
if (!Live()) return;
var api = SchClassLiveDebug.Create();
var sch = SchClassLiveDebug.Sch
?? (await api.SchInfo.AllListAsync()).FirstOrDefault()?.SchSerId;
if (string.IsNullOrEmpty(sch))
{
output.WriteLine("未取到学校序列号(设置 YH_SCHCLASS_DEBUG_SCH 或确认学校列表非空)");
return;
}
var tree = await api.SchTree.GetTeaTreeAsync(sch, null);
output.WriteLine($"SchTree[{sch}] 根节点 {tree.Count} 个");
foreach (var root in tree)
{
output.WriteLine($" {root.Id} / {root.Name} / type={root.Type} / 子节点 {root.Children?.Count ?? 0} 个");
}
}
[Fact]
public async Task 联调_一键跑通全部端点()
{