@@ -190,10 +190,9 @@ public void MapEndpoint_AttributesCollectedAsMetadata()
190
190
// Assert
191
191
var endpointBuilder1 = GetRouteEndpointBuilder ( builder ) ;
192
192
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 ] ) ;
197
196
}
198
197
199
198
[ Fact ]
@@ -228,11 +227,10 @@ public void MapEndpoint_PrecedenceOfMetadata_BuilderMetadataReturned()
228
227
229
228
// As with the Delegate Map method overloads for route handlers, the attributes on the RequestDelegate
230
229
// 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 ] ) ) ;
236
234
237
235
Assert . Equal ( "BUILDER" , endpoint . Metadata . GetMetadata < IHttpMethodMetadata > ( ) ? . HttpMethods . Single ( ) ) ;
238
236
0 commit comments