From 438476d8455e03b92568fae9cfe0da6e573cdc8f Mon Sep 17 00:00:00 2001 From: maliming Date: Wed, 2 Sep 2026 18:03:45 +0800 Subject: [PATCH] Stop asserting the default provider in the enum adapter test --- .../AbpValidationAttributeAdapterProvider_Tests.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/DataAnnotations/AbpValidationAttributeAdapterProvider_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/DataAnnotations/AbpValidationAttributeAdapterProvider_Tests.cs index d5bb122939..365ed6b3cc 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/DataAnnotations/AbpValidationAttributeAdapterProvider_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/DataAnnotations/AbpValidationAttributeAdapterProvider_Tests.cs @@ -17,11 +17,7 @@ public class AbpValidationAttributeAdapterProvider_Tests [Fact] public void Should_Return_An_Adapter_For_The_EnumDataTypeAttribute() { - //ASP.NET Core does not provide an adapter for the EnumDataTypeAttribute. - new ValidationAttributeAdapterProvider() - .GetAttributeAdapter(new EnumDataTypeAttribute(typeof(MyEnum)), null) - .ShouldBeNull(); - + //The default ASP.NET Core provider returns null for it, that's why we supply our own adapter. _provider.GetAttributeAdapter(new EnumDataTypeAttribute(typeof(MyEnum)), null) .ShouldBeOfType(); }