Browse Source
Stop asserting the default provider in the enum adapter test
pull/26129/head
maliming
3 days ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
1 changed files with
1 additions and
5 deletions
-
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<EnumDataTypeAttributeAdapter>(); |
|
|
|
} |
|
|
|
|