File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/Mvc/Mvc.Core/test/ApplicationModels Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 33
44using System . Reflection ;
55using Microsoft . AspNetCore . Http ;
6+ using Microsoft . AspNetCore . Http . Metadata ;
67using Microsoft . AspNetCore . Mvc . ActionConstraints ;
78using Microsoft . AspNetCore . Mvc . Filters ;
89using Microsoft . AspNetCore . Mvc . ModelBinding ;
@@ -1277,8 +1278,9 @@ public void AddReturnTypeMetadata_ExtractsMetadataFromReturnType()
12771278
12781279 // Assert
12791280 Assert . NotNull ( selector . EndpointMetadata ) ;
1280- Assert . Single ( selector . EndpointMetadata ) ;
1281- Assert . IsType < ProducesResponseTypeMetadata > ( selector . EndpointMetadata . Single ( ) ) ;
1281+ Assert . Equal ( 2 , selector . EndpointMetadata . Count ) ;
1282+ Assert . Single ( selector . EndpointMetadata . OfType < ProducesResponseTypeMetadata > ( ) ) ;
1283+ Assert . Single ( selector . EndpointMetadata . OfType < IApiEndpointMetadata > ( ) ) ;
12821284 Assert . Equal ( 200 , ( ( ProducesResponseTypeMetadata ) selector . EndpointMetadata [ 0 ] ) . StatusCode ) ;
12831285 }
12841286
You can’t perform that action at this time.
0 commit comments