This repository was archived by the owner on Jul 2, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
LinkDotNet.EnumValueObject.UnitTests
LinkDotNet.EnumValueObject Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 88
99 <ItemGroup >
1010 <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 16.9.1" />
11- <PackageReference Include =" MSTest.TestAdapter" Version =" 2.1.2 " />
12- <PackageReference Include =" MSTest.TestFramework" Version =" 2.1.2 " />
11+ <PackageReference Include =" MSTest.TestAdapter" Version =" 2.2.1 " />
12+ <PackageReference Include =" MSTest.TestFramework" Version =" 2.2.1 " />
1313 <PackageReference Include =" Shouldly" Version =" 4.0.3" />
1414 </ItemGroup >
1515
Original file line number Diff line number Diff line change @@ -105,11 +105,11 @@ private static TEnumeration[] GetEnumerations()
105105 {
106106 var enumerationType = typeof ( TEnumeration ) ;
107107
108- return enumerationType . GetFields ( BindingFlags . Public | BindingFlags . Static | BindingFlags . FlattenHierarchy )
109- . Where ( info => enumerationType . IsAssignableFrom ( info . FieldType ) )
110- . Select ( info => info . GetValue ( null ) )
111- . Cast < TEnumeration > ( )
112- . ToArray ( ) ;
108+ return enumerationType
109+ . GetFields ( BindingFlags . Public | BindingFlags . Static | BindingFlags . DeclaredOnly )
110+ . Where ( info => info . FieldType == typeof ( TEnumeration ) )
111+ . Select ( info => ( TEnumeration ) info . GetValue ( null ) )
112+ . ToArray ( ) ;
113113 }
114114 }
115115}
You can’t perform that action at this time.
0 commit comments