Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b56e08a
fix(analyzer): 清理 YamlConfigLoaderTests 的异步等待 warning
GeWuYou Apr 25, 2026
877d1f3
fix(godot-tests): 清理模块安装测试异步断言包装
GeWuYou Apr 25, 2026
1dae0b1
test(game-tests): 清理配置测试中的机械型 MA0004 包装
GeWuYou Apr 25, 2026
27f5a2f
fix(game): 清理切换管道中的低风险 MA0004
GeWuYou Apr 25, 2026
b27bcb5
refactor(game-tests): 清理指定加载测试的 MA0051
GeWuYou Apr 25, 2026
425c22d
docs(ai-plan): 更新 analyzer-warning-reduction 恢复点
GeWuYou Apr 25, 2026
64c8589
fix(game): 清理 SettingsSystem 与 ScopedStorage 的 MA0004
GeWuYou Apr 25, 2026
4bb8f4f
fix(game): 清理 SceneRouterBase 低风险异步包装
GeWuYou Apr 25, 2026
bad6c1b
fix(game): 清理 FileStorage 异步存储路径的 MA0004
GeWuYou Apr 25, 2026
e8eda81
fix(routing): 清理 RouterBase 守卫异步等待的 MA0004
GeWuYou Apr 25, 2026
3be299e
fix(game): 清理 UiRouterBase 的低风险异步包装
GeWuYou Apr 25, 2026
09cbd16
test(game-tests): 简化 YAML 配置加载异常断言包装
GeWuYou Apr 25, 2026
9b20a07
refactor(game-tests): 简化异步异常断言包装
GeWuYou Apr 25, 2026
67c9359
test(core-tests): 简化异步断言包装
GeWuYou Apr 25, 2026
0d8f854
refactor(core-tests): 简化状态机异步断言包装
GeWuYou Apr 25, 2026
ffd62bb
docs(ai-plan): 更新 analyzer-warning-reduction 恢复点
GeWuYou Apr 25, 2026
65cd23f
test(core-tests): 简化结果与协程异步断言包装
GeWuYou Apr 25, 2026
2a9e9f2
test(game-tests): 简化架构配置集成测试异步断言
GeWuYou Apr 25, 2026
f67b2ce
refactor(core-tests): 显式指定字符串字典比较器
GeWuYou Apr 25, 2026
6188876
test(core-tests): 规范字符串比较断言写法
GeWuYou Apr 25, 2026
737d0b5
test(core-tests): 显式指定日志测试字符串比较器
GeWuYou Apr 25, 2026
b7560fc
test(core-tests): 收敛函数式与状态测试的低风险 warning
GeWuYou Apr 25, 2026
b45e551
test(core-tests): 收敛选项与扩展测试的基础 warning
GeWuYou Apr 25, 2026
03c73a8
test(core-tests): 收敛测试桩与辅助类型 warning
GeWuYou Apr 25, 2026
9ce1fa6
refactor(core): 收敛 Core 扩展与测试的机械 warning
GeWuYou Apr 25, 2026
e9cd41d
docs(ai-plan): 更新 analyzer warning reduction 恢复点
GeWuYou Apr 25, 2026
be336b2
docs(ai-plan): 修正 analyzer warning reduction 指标
GeWuYou Apr 25, 2026
4740d30
fix(core): 修复 PR 评审指出的编译与样式问题
GeWuYou Apr 25, 2026
70c42b5
fix(scene): 修复场景替换核心异步执行的配置问题
GeWuYou Apr 25, 2026
a7a3eca
fix(pr-review): 收敛PR建议并修复构建验证
GeWuYou Apr 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,15 @@ internal sealed class AdditionalAssemblyNotificationHandlerRegistry : ICqrsHandl
/// </exception>
public void Register(IServiceCollection services, ILogger logger)
{
ArgumentNullException.ThrowIfNull(services);
ArgumentNullException.ThrowIfNull(logger);
if (services is null)
{
throw new ArgumentNullException(nameof(services));
}

if (logger is null)
{
throw new ArgumentNullException(nameof(logger));
}

services.AddTransient<INotificationHandler<AdditionalAssemblyNotification>>(_ => CreateHandler());
logger.Debug(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ public async Task SendRequestAsync_Should_ResolveCqrsRuntime_OnlyOnce_When_Acces
{
workersReady.Signal();
startGate.Wait();
return await context.SendRequestAsync(new TestCqrsRequest());
return await context.SendRequestAsync(new TestCqrsRequest()).ConfigureAwait(false);
}))
.ToArray();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ public async Task InitializeAsync_Should_Raise_PhaseChanged_With_Sender_And_Even
/// 验证用户初始化失败时,等待 Ready 的任务会失败并进入 FailedInitialization 阶段。
/// </summary>
[Test]
public async Task InitializeAsync_When_OnInitialize_Throws_Should_Mark_FailedInitialization()
public void InitializeAsync_When_OnInitialize_Throws_Should_Mark_FailedInitialization()
{
var architecture = new PhaseTrackingArchitecture(() => throw new InvalidOperationException("boom"));

var exception = Assert.ThrowsAsync<InvalidOperationException>(async () => await architecture.InitializeAsync());
var exception = Assert.ThrowsAsync<InvalidOperationException>(() => architecture.InitializeAsync());
Assert.That(exception, Is.Not.Null);
Assert.That(architecture.CurrentPhase, Is.EqualTo(ArchitecturePhase.FailedInitialization));
Assert.ThrowsAsync<InvalidOperationException>(async () => await architecture.WaitUntilReadyAsync());
Assert.ThrowsAsync<InvalidOperationException>(() => architecture.WaitUntilReadyAsync());
}

/// <summary>
Expand Down Expand Up @@ -139,7 +139,7 @@ public async Task DestroyAsync_After_FailedInitialization_Should_Cleanup_And_Ent
var destroyOrder = new List<string>();
var architecture = new FailingInitializationArchitecture(destroyOrder);

var exception = Assert.ThrowsAsync<InvalidOperationException>(async () => await architecture.InitializeAsync());
var exception = Assert.ThrowsAsync<InvalidOperationException>(() => architecture.InitializeAsync());
Assert.That(exception, Is.Not.Null);
Assert.That(architecture.CurrentPhase, Is.EqualTo(ArchitecturePhase.FailedInitialization));

Expand Down
28 changes: 14 additions & 14 deletions GFramework.Core.Tests/Architectures/ArchitectureServicesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,12 @@ public void UnRegisterEvent<TEvent>(Action<TEvent> onEvent)
public ValueTask<TResponse> SendRequestAsync<TResponse>(IRequest<TResponse> request,
CancellationToken cancellationToken = default)
{
throw new NotImplementedException();
throw new NotSupportedException();
}

public TResponse SendRequest<TResponse>(IRequest<TResponse> request)
{
throw new NotImplementedException();
throw new NotSupportedException();
}

/// <summary>
Expand All @@ -366,12 +366,12 @@ public TResponse SendRequest<TResponse>(IRequest<TResponse> request)
/// <param name="command">要发送的命令。</param>
/// <param name="cancellationToken">取消令牌。</param>
/// <returns>命令响应任务。</returns>
/// <exception cref="NotImplementedException">该测试桩未实现此成员。</exception>
/// <exception cref="NotSupportedException">该测试桩不支持此成员。</exception>
public ValueTask<TResponse> SendCommandAsync<TResponse>(
GFramework.Cqrs.Abstractions.Cqrs.Command.ICommand<TResponse> command,
CancellationToken cancellationToken = default)
{
throw new NotImplementedException();
throw new NotSupportedException();
}

/// <summary>
Expand All @@ -380,10 +380,10 @@ public ValueTask<TResponse> SendCommandAsync<TResponse>(
/// <typeparam name="TResponse">命令响应类型。</typeparam>
/// <param name="command">要发送的命令。</param>
/// <returns>命令响应。</returns>
/// <exception cref="NotImplementedException">该测试桩未实现此成员。</exception>
/// <exception cref="NotSupportedException">该测试桩不支持此成员。</exception>
public TResponse SendCommand<TResponse>(GFramework.Cqrs.Abstractions.Cqrs.Command.ICommand<TResponse> command)
{
throw new NotImplementedException();
throw new NotSupportedException();
}

/// <summary>
Expand All @@ -393,12 +393,12 @@ public TResponse SendCommand<TResponse>(GFramework.Cqrs.Abstractions.Cqrs.Comman
/// <param name="query">要发送的查询。</param>
/// <param name="cancellationToken">取消令牌。</param>
/// <returns>查询结果任务。</returns>
/// <exception cref="NotImplementedException">该测试桩未实现此成员。</exception>
/// <exception cref="NotSupportedException">该测试桩不支持此成员。</exception>
public ValueTask<TResponse> SendQueryAsync<TResponse>(
GFramework.Cqrs.Abstractions.Cqrs.Query.IQuery<TResponse> query,
CancellationToken cancellationToken = default)
{
throw new NotImplementedException();
throw new NotSupportedException();
}

/// <summary>
Expand All @@ -407,35 +407,35 @@ public ValueTask<TResponse> SendQueryAsync<TResponse>(
/// <typeparam name="TResponse">查询结果类型。</typeparam>
/// <param name="query">要发送的查询。</param>
/// <returns>查询结果。</returns>
/// <exception cref="NotImplementedException">该测试桩未实现此成员。</exception>
/// <exception cref="NotSupportedException">该测试桩不支持此成员。</exception>
public TResponse SendQuery<TResponse>(GFramework.Cqrs.Abstractions.Cqrs.Query.IQuery<TResponse> query)
{
throw new NotImplementedException();
throw new NotSupportedException();
}

public ValueTask PublishAsync<TNotification>(TNotification notification,
CancellationToken cancellationToken = default) where TNotification : INotification
{
throw new NotImplementedException();
throw new NotSupportedException();
}

public IAsyncEnumerable<TResponse> CreateStream<TResponse>(
IStreamRequest<TResponse> request,
CancellationToken cancellationToken = default)
{
throw new NotImplementedException();
throw new NotSupportedException();
}

public ValueTask SendAsync<TCommand>(TCommand command, CancellationToken cancellationToken = default)
where TCommand : IRequest<Unit>
{
throw new NotImplementedException();
throw new NotSupportedException();
}

public ValueTask<TResponse> SendAsync<TResponse>(IRequest<TResponse> command,
CancellationToken cancellationToken = default)
{
throw new NotImplementedException();
throw new NotSupportedException();
}

public void SendCommand(ICommand command)
Expand Down
40 changes: 20 additions & 20 deletions GFramework.Core.Tests/Architectures/GameContextTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,11 @@ public void UnRegisterEvent<TEvent>(Action<TEvent> onEvent)
/// <param name="request">要发送的请求。</param>
/// <param name="cancellationToken">取消令牌。</param>
/// <returns>请求响应任务。</returns>
/// <exception cref="NotImplementedException">该测试桩未实现此成员。</exception>
/// <exception cref="NotSupportedException">该测试桩不支持此成员。</exception>
public ValueTask<TResponse> SendRequestAsync<TResponse>(IRequest<TResponse> request,
CancellationToken cancellationToken = default)
{
throw new NotImplementedException();
throw new NotSupportedException();
}

/// <summary>
Expand All @@ -414,10 +414,10 @@ public ValueTask<TResponse> SendRequestAsync<TResponse>(IRequest<TResponse> requ
/// <typeparam name="TResponse">响应类型。</typeparam>
/// <param name="request">要发送的请求。</param>
/// <returns>请求响应。</returns>
/// <exception cref="NotImplementedException">该测试桩未实现此成员。</exception>
/// <exception cref="NotSupportedException">该测试桩不支持此成员。</exception>
public TResponse SendRequest<TResponse>(IRequest<TResponse> request)
{
throw new NotImplementedException();
throw new NotSupportedException();
}

/// <summary>
Expand All @@ -427,12 +427,12 @@ public TResponse SendRequest<TResponse>(IRequest<TResponse> request)
/// <param name="command">要发送的命令。</param>
/// <param name="cancellationToken">取消令牌。</param>
/// <returns>命令响应任务。</returns>
/// <exception cref="NotImplementedException">该测试桩未实现此成员。</exception>
/// <exception cref="NotSupportedException">该测试桩不支持此成员。</exception>
public ValueTask<TResponse> SendCommandAsync<TResponse>(
GFramework.Cqrs.Abstractions.Cqrs.Command.ICommand<TResponse> command,
CancellationToken cancellationToken = default)
{
throw new NotImplementedException();
throw new NotSupportedException();
}

/// <summary>
Expand All @@ -441,10 +441,10 @@ public ValueTask<TResponse> SendCommandAsync<TResponse>(
/// <typeparam name="TResponse">命令响应类型。</typeparam>
/// <param name="command">要发送的命令。</param>
/// <returns>命令响应。</returns>
/// <exception cref="NotImplementedException">该测试桩未实现此成员。</exception>
/// <exception cref="NotSupportedException">该测试桩不支持此成员。</exception>
public TResponse SendCommand<TResponse>(GFramework.Cqrs.Abstractions.Cqrs.Command.ICommand<TResponse> command)
{
throw new NotImplementedException();
throw new NotSupportedException();
}

/// <summary>
Expand All @@ -454,12 +454,12 @@ public TResponse SendCommand<TResponse>(GFramework.Cqrs.Abstractions.Cqrs.Comman
/// <param name="query">要发送的查询。</param>
/// <param name="cancellationToken">取消令牌。</param>
/// <returns>查询结果任务。</returns>
/// <exception cref="NotImplementedException">该测试桩未实现此成员。</exception>
/// <exception cref="NotSupportedException">该测试桩不支持此成员。</exception>
public ValueTask<TResponse> SendQueryAsync<TResponse>(
GFramework.Cqrs.Abstractions.Cqrs.Query.IQuery<TResponse> query,
CancellationToken cancellationToken = default)
{
throw new NotImplementedException();
throw new NotSupportedException();
}

/// <summary>
Expand All @@ -468,10 +468,10 @@ public ValueTask<TResponse> SendQueryAsync<TResponse>(
/// <typeparam name="TResponse">查询结果类型。</typeparam>
/// <param name="query">要发送的查询。</param>
/// <returns>查询结果。</returns>
/// <exception cref="NotImplementedException">该测试桩未实现此成员。</exception>
/// <exception cref="NotSupportedException">该测试桩不支持此成员。</exception>
public TResponse SendQuery<TResponse>(GFramework.Cqrs.Abstractions.Cqrs.Query.IQuery<TResponse> query)
{
throw new NotImplementedException();
throw new NotSupportedException();
}

/// <summary>
Expand All @@ -481,11 +481,11 @@ public TResponse SendQuery<TResponse>(GFramework.Cqrs.Abstractions.Cqrs.Query.IQ
/// <param name="notification">要发布的通知。</param>
/// <param name="cancellationToken">取消令牌。</param>
/// <returns>通知发布任务。</returns>
/// <exception cref="NotImplementedException">该测试桩未实现此成员。</exception>
/// <exception cref="NotSupportedException">该测试桩不支持此成员。</exception>
public ValueTask PublishAsync<TNotification>(TNotification notification,
CancellationToken cancellationToken = default) where TNotification : INotification
{
throw new NotImplementedException();
throw new NotSupportedException();
}

/// <summary>
Expand All @@ -495,12 +495,12 @@ public ValueTask PublishAsync<TNotification>(TNotification notification,
/// <param name="request">流式请求。</param>
/// <param name="cancellationToken">取消令牌。</param>
/// <returns>异步响应流。</returns>
/// <exception cref="NotImplementedException">该测试桩未实现此成员。</exception>
/// <exception cref="NotSupportedException">该测试桩不支持此成员。</exception>
public IAsyncEnumerable<TResponse> CreateStream<TResponse>(
IStreamRequest<TResponse> request,
CancellationToken cancellationToken = default)
{
throw new NotImplementedException();
throw new NotSupportedException();
}

/// <summary>
Expand All @@ -510,11 +510,11 @@ public IAsyncEnumerable<TResponse> CreateStream<TResponse>(
/// <param name="command">要发送的命令。</param>
/// <param name="cancellationToken">取消令牌。</param>
/// <returns>命令发送任务。</returns>
/// <exception cref="NotImplementedException">该测试桩未实现此成员。</exception>
/// <exception cref="NotSupportedException">该测试桩不支持此成员。</exception>
public ValueTask SendAsync<TCommand>(TCommand command, CancellationToken cancellationToken = default)
where TCommand : IRequest<Unit>
{
throw new NotImplementedException();
throw new NotSupportedException();
}

/// <summary>
Expand All @@ -524,11 +524,11 @@ public ValueTask SendAsync<TCommand>(TCommand command, CancellationToken cancell
/// <param name="command">要发送的请求。</param>
/// <param name="cancellationToken">取消令牌。</param>
/// <returns>请求响应任务。</returns>
/// <exception cref="NotImplementedException">该测试桩未实现此成员。</exception>
/// <exception cref="NotSupportedException">该测试桩不支持此成员。</exception>
public ValueTask<TResponse> SendAsync<TResponse>(IRequest<TResponse> command,
CancellationToken cancellationToken = default)
{
throw new NotImplementedException();
throw new NotSupportedException();
}

/// <summary>
Expand Down
Loading
Loading