mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 17:21:16 +08:00
- 拆分 GFramework.Core.Tests 中多组测试辅助类型到独立文件以消减 MA0048 warning - 更新 analyzer-warning-reduction 的 tracking 与 trace 以记录批处理基线和下一恢复点 - 验证 GFramework.Core.Tests Release 构建清零并将仓库根权威 warning 基线压降到 288
40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using GFramework.Core.Command;
|
|
|
|
namespace GFramework.Core.Tests.Command;
|
|
|
|
/// <summary>
|
|
/// 表示 <see cref="CommandExecutorTests" /> 使用的异步测试命令。
|
|
/// </summary>
|
|
public sealed class TestAsyncCommand : AbstractAsyncCommand<TestCommandInput>
|
|
{
|
|
/// <summary>
|
|
/// 初始化 <see cref="TestAsyncCommand" /> 的新实例。
|
|
/// </summary>
|
|
/// <param name="input">命令输入。</param>
|
|
public TestAsyncCommand(TestCommandInput input) : base(input)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取一个值,该值指示命令是否已经执行。
|
|
/// </summary>
|
|
public bool Executed { get; private set; }
|
|
|
|
/// <summary>
|
|
/// 获取命令记录的执行结果值。
|
|
/// </summary>
|
|
public int ExecutedValue { get; private set; }
|
|
|
|
/// <summary>
|
|
/// 执行异步测试命令并记录执行状态。
|
|
/// </summary>
|
|
/// <param name="input">命令输入。</param>
|
|
/// <returns>已完成的异步任务。</returns>
|
|
protected override Task OnExecuteAsync(TestCommandInput input)
|
|
{
|
|
Executed = true;
|
|
ExecutedValue = 42;
|
|
return Task.CompletedTask;
|
|
}
|
|
}
|