File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
src/Mvc/Mvc.Core/test/ModelBinding/Metadata Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -216,10 +216,8 @@ public void GetAttributesForParameter_SomeAttributes()
216
216
attribute => Assert . IsType < RequiredAttribute > ( attribute ) ,
217
217
attribute => Assert . IsType < RangeAttribute > ( attribute ) ) ;
218
218
Assert . Null ( attributes . PropertyAttributes ) ;
219
- Assert . Collection (
220
- // Take(1) because the attribute or attributes after SerializableAttribute are framework-specific.
221
- attributes . TypeAttributes . Take ( 1 ) ,
222
- attribute => Assert . IsType < SerializableAttribute > ( attribute ) ) ;
219
+ // Check that SerializableAttribute exists in TypeAttributes (order-agnostic)
220
+ Assert . Contains ( attributes . TypeAttributes , attr => attr is SerializableAttribute ) ;
223
221
}
224
222
225
223
[ Fact ]
You can’t perform that action at this time.
0 commit comments