@@ -190,10 +190,9 @@ public void MapEndpoint_AttributesCollectedAsMetadata()
190190 // Assert
191191 var endpointBuilder1 = GetRouteEndpointBuilder ( builder ) ;
192192 Assert . Equal ( "/" , endpointBuilder1 . RoutePattern . RawText ) ;
193- Assert . Equal ( 3 , endpointBuilder1 . Metadata . Count ) ;
194- Assert . Equal ( ( ( RequestDelegate ) Handle ) . Method , endpointBuilder1 . Metadata [ 0 ] ) ;
195- Assert . IsType < Attribute1 > ( endpointBuilder1 . Metadata [ 1 ] ) ;
196- Assert . IsType < Attribute2 > ( endpointBuilder1 . Metadata [ 2 ] ) ;
193+ Assert . Equal ( 2 , endpointBuilder1 . Metadata . Count ) ;
194+ Assert . IsType < Attribute1 > ( endpointBuilder1 . Metadata [ 0 ] ) ;
195+ Assert . IsType < Attribute2 > ( endpointBuilder1 . Metadata [ 1 ] ) ;
197196 }
198197
199198 [ Fact ]
@@ -228,11 +227,10 @@ public void MapEndpoint_PrecedenceOfMetadata_BuilderMetadataReturned()
228227
229228 // As with the Delegate Map method overloads for route handlers, the attributes on the RequestDelegate
230229 // can override the HttpMethodMetadata. Extension methods could already do this.
231- Assert . Equal ( 4 , endpoint . Metadata . Count ) ;
232- Assert . Equal ( ( ( RequestDelegate ) HandleHttpMetdata ) . Method , endpoint . Metadata [ 0 ] ) ;
233- Assert . Equal ( "METHOD" , GetMethod ( endpoint . Metadata [ 1 ] ) ) ;
234- Assert . Equal ( "ATTRIBUTE" , GetMethod ( endpoint . Metadata [ 2 ] ) ) ;
235- Assert . Equal ( "BUILDER" , GetMethod ( endpoint . Metadata [ 3 ] ) ) ;
230+ Assert . Equal ( 3 , endpoint . Metadata . Count ) ;
231+ Assert . Equal ( "METHOD" , GetMethod ( endpoint . Metadata [ 0 ] ) ) ;
232+ Assert . Equal ( "ATTRIBUTE" , GetMethod ( endpoint . Metadata [ 1 ] ) ) ;
233+ Assert . Equal ( "BUILDER" , GetMethod ( endpoint . Metadata [ 2 ] ) ) ;
236234
237235 Assert . Equal ( "BUILDER" , endpoint . Metadata . GetMetadata < IHttpMethodMetadata > ( ) ? . HttpMethods . Single ( ) ) ;
238236
0 commit comments