using GFramework.Core.Abstractions.Architectures;
using GFramework.Core.Rule;
namespace GFramework.Core.Tests.Rule;
///
/// 提供给 ContextAware 相关测试复用的上下文感知对象。
///
public class TestContextAware : ContextAwareBase
{
///
/// 获取当前测试对象已绑定的上下文实例。
///
public IArchitectureContext? PublicContext => Context;
///
/// 获取一个值,指示上下文就绪回调是否已经触发。
///
public bool OnContextReadyCalled { get; private set; }
///
/// 在上下文完成绑定后记录回调已被触发,供断言使用。
///
protected override void OnContextReady()
{
OnContextReadyCalled = true;
}
}