From 058dff010c30056c3d8118e5805ba5b0bd8c4c2b Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Tue, 17 Feb 2026 17:47:14 +0800 Subject: [PATCH] =?UTF-8?q?refactor(tests):=20=E7=A7=BB=E9=99=A4=E6=9E=B6?= =?UTF-8?q?=E6=9E=84=E6=9C=8D=E5=8A=A1=E6=B5=8B=E8=AF=95=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E6=9C=AA=E5=AE=9E=E7=8E=B0=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 从 ArchitectureServicesTests 类中删除 QueryAsync 方法 - 从 ArchitectureServicesTests 类中删除 PublishEventAsync 方法 - 从 GameContextTests 类中删除 QueryAsync 方法 - 从 GameContextTests 类中删除 PublishEventAsync 方法 - 清理相关的方法签名和异常抛出代码 - 简化测试类结构,移除不必要的接口实现 --- .../architecture/ArchitectureServicesTests.cs | 12 ------------ .../architecture/GameContextTests.cs | 12 ------------ 2 files changed, 24 deletions(-) diff --git a/GFramework.Core.Tests/architecture/ArchitectureServicesTests.cs b/GFramework.Core.Tests/architecture/ArchitectureServicesTests.cs index 3e607e8..110bcfe 100644 --- a/GFramework.Core.Tests/architecture/ArchitectureServicesTests.cs +++ b/GFramework.Core.Tests/architecture/ArchitectureServicesTests.cs @@ -356,18 +356,6 @@ public class TestArchitectureContextV3 : IArchitectureContext { return _environment; } - - public ValueTask QueryAsync(IRequest query, - CancellationToken cancellationToken = default) - { - throw new NotImplementedException(); - } - - public ValueTask PublishEventAsync(TNotification notification, - CancellationToken cancellationToken = default) where TNotification : INotification - { - throw new NotImplementedException(); - } } #endregion \ No newline at end of file diff --git a/GFramework.Core.Tests/architecture/GameContextTests.cs b/GFramework.Core.Tests/architecture/GameContextTests.cs index 92ee46b..90575be 100644 --- a/GFramework.Core.Tests/architecture/GameContextTests.cs +++ b/GFramework.Core.Tests/architecture/GameContextTests.cs @@ -451,16 +451,4 @@ public class TestArchitectureContext : IArchitectureContext { return Environment; } - - public ValueTask QueryAsync(IRequest query, - CancellationToken cancellationToken = default) - { - throw new NotImplementedException(); - } - - public ValueTask PublishEventAsync(TNotification notification, - CancellationToken cancellationToken = default) where TNotification : INotification - { - throw new NotImplementedException(); - } } \ No newline at end of file