fix(cqrs): 修复CQRS命名空间兼容性测试中的类型解析问题

- 更新注释以更准确描述基础消息类型的命名空间暴露方式
- 将Type.GetType的throwOnError参数从true改为false以避免异常抛出
- 调整测试逻辑以更好地处理类型解析场景
This commit is contained in:
GeWuYou 2026-04-15 22:59:46 +08:00
parent 7b63a65f51
commit 922ad43b5e

View File

@ -17,7 +17,7 @@ namespace GFramework.Core.Tests.Cqrs;
public sealed class CqrsPublicNamespaceCompatibilityTests
{
/// <summary>
/// 验证基础消息类型继续暴露在历史 Core.Cqrs 命名空间,同时由独立 runtime 程序集承载实现。
/// 验证基础消息类型继续暴露在历史公开 CQRS 命名空间GFramework.Cqrs.*,同时由独立 runtime 程序集承载实现。
/// </summary>
[Test]
public void Base_Message_Types_Should_Live_In_Cqrs_Namespaces_And_Runtime_Assembly()
@ -57,7 +57,7 @@ public sealed class CqrsPublicNamespaceCompatibilityTests
private static void AssertForwardedType(string assemblyQualifiedTypeName)
{
var resolvedType = Type.GetType(assemblyQualifiedTypeName, throwOnError: true);
var resolvedType = Type.GetType(assemblyQualifiedTypeName, throwOnError: false);
Assert.Multiple(() =>
{