GFramework/GFramework.Core.Tests/Command/TestAsyncCommandWithExceptionV3.cs
gewuyou f0a36de07c test(core-tests): 批量拆分测试辅助类型以消减警告
- 拆分 GFramework.Core.Tests 中多组测试辅助类型到独立文件以消减 MA0048 warning

- 更新 analyzer-warning-reduction 的 tracking 与 trace 以记录批处理基线和下一恢复点

- 验证 GFramework.Core.Tests Release 构建清零并将仓库根权威 warning 基线压降到 288
2026-04-27 19:44:07 +08:00

29 lines
1.0 KiB
C#

using GFramework.Core.Command;
namespace GFramework.Core.Tests.Command;
/// <summary>
/// 表示 <see cref="AbstractAsyncCommandTests" /> 使用的异常路径异步测试命令。
/// </summary>
public sealed class TestAsyncCommandWithExceptionV3 : AbstractAsyncCommand<TestCommandInputV2>
{
/// <summary>
/// 初始化 <see cref="TestAsyncCommandWithExceptionV3" /> 的新实例。
/// </summary>
/// <param name="input">命令输入。</param>
public TestAsyncCommandWithExceptionV3(TestCommandInputV2 input) : base(input)
{
}
/// <summary>
/// 执行测试命令并始终抛出预期异常。
/// </summary>
/// <param name="input">命令输入。</param>
/// <returns>此方法不会正常返回。</returns>
/// <exception cref="InvalidOperationException">始终抛出,用于验证异常传播行为。</exception>
protected override Task OnExecuteAsync(TestCommandInputV2 input)
{
throw new InvalidOperationException("Test exception");
}
}