mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 00:39:00 +08:00
- 拆分 GFramework.Core.Tests 中多组测试辅助类型到独立文件以消减 MA0048 warning - 更新 analyzer-warning-reduction 的 tracking 与 trace 以记录批处理基线和下一恢复点 - 验证 GFramework.Core.Tests Release 构建清零并将仓库根权威 warning 基线压降到 288
29 lines
833 B
C#
29 lines
833 B
C#
using GFramework.Core.Abstractions.Architectures;
|
|
using GFramework.Core.Rule;
|
|
|
|
namespace GFramework.Core.Tests.Rule;
|
|
|
|
/// <summary>
|
|
/// 提供给 ContextAware 相关测试复用的上下文感知对象。
|
|
/// </summary>
|
|
public class TestContextAware : ContextAwareBase
|
|
{
|
|
/// <summary>
|
|
/// 获取当前测试对象已绑定的上下文实例。
|
|
/// </summary>
|
|
public IArchitectureContext? PublicContext => Context;
|
|
|
|
/// <summary>
|
|
/// 获取一个值,指示上下文就绪回调是否已经触发。
|
|
/// </summary>
|
|
public bool OnContextReadyCalled { get; private set; }
|
|
|
|
/// <summary>
|
|
/// 在上下文完成绑定后记录回调已被触发,供断言使用。
|
|
/// </summary>
|
|
protected override void OnContextReady()
|
|
{
|
|
OnContextReadyCalled = true;
|
|
}
|
|
}
|