From 49ed5d0d0686e167ce0dccf7ccc02d54c9adbf01 Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Wed, 15 Apr 2026 15:22:00 +0800 Subject: [PATCH] =?UTF-8?q?refactor(tests):=20=E6=B7=BB=E5=8A=A0CQRS?= =?UTF-8?q?=E6=8A=BD=E8=B1=A1=E5=B1=82=E4=BE=9D=E8=B5=96=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在ContainerRegistrationFixtures.cs中添加GFramework.Core.Abstractions.Cqrs命名空间引用 - 在MicrosoftDiContainerTests.cs中添加GFramework.Core.Abstractions.Cqrs命名空间引用 - 统一测试文件中的依赖注入配置 - 确保CQRS相关接口的正确引用路径 --- GFramework.Core.Tests/Cqrs/ContainerRegistrationFixtures.cs | 2 ++ GFramework.Core.Tests/Ioc/MicrosoftDiContainerTests.cs | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/GFramework.Core.Tests/Cqrs/ContainerRegistrationFixtures.cs b/GFramework.Core.Tests/Cqrs/ContainerRegistrationFixtures.cs index f01af4de..58483c15 100644 --- a/GFramework.Core.Tests/Cqrs/ContainerRegistrationFixtures.cs +++ b/GFramework.Core.Tests/Cqrs/ContainerRegistrationFixtures.cs @@ -11,6 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +using GFramework.Core.Abstractions.Cqrs; + namespace GFramework.Core.Tests.Cqrs; /// diff --git a/GFramework.Core.Tests/Ioc/MicrosoftDiContainerTests.cs b/GFramework.Core.Tests/Ioc/MicrosoftDiContainerTests.cs index 6ae0747c..186248ff 100644 --- a/GFramework.Core.Tests/Ioc/MicrosoftDiContainerTests.cs +++ b/GFramework.Core.Tests/Ioc/MicrosoftDiContainerTests.cs @@ -1,5 +1,6 @@ using System.Reflection; using GFramework.Core.Abstractions.Bases; +using GFramework.Core.Abstractions.Cqrs; using GFramework.Core.Ioc; using GFramework.Core.Logging; using GFramework.Core.Tests.Cqrs; @@ -13,8 +14,6 @@ namespace GFramework.Core.Tests.Ioc; [TestFixture] public class MicrosoftDiContainerTests { - private MicrosoftDiContainer _container = null!; - /// /// 在每个测试方法执行前进行设置 /// @@ -34,6 +33,8 @@ public class MicrosoftDiContainerTests CqrsTestRuntime.RegisterInfrastructure(_container); } + private MicrosoftDiContainer _container = null!; + /// /// 测试注册单例实例的功能 ///