@@ -15,7 +15,8 @@ public class ApiInfoHelperTests
1515 private Context CreateTestContext (
1616 Dictionary < string , string > ? headers = null ,
1717 object ? body = null ,
18- Dictionary < string , string > ? query = null )
18+ Dictionary < string , string > ? query = null ,
19+ Dictionary < string , string > ? route = null )
1920 {
2021 string ? contentType = headers ? . GetValueOrDefault ( "content-type" ) ?? "application/json" ;
2122 Stream ? bodyStream = null ;
@@ -70,7 +71,9 @@ private Context CreateTestContext(
7071
7172 var queryParams = query ?? new Dictionary < string , string > ( ) ;
7273 var headerDict = headers ?? new Dictionary < string , string > ( ) ;
73- var parsed = HttpHelper . ReadAndFlattenHttpDataAsync ( queryParams , headerDict , new Dictionary < string , string > ( ) , bodyStream , contentType , bodyStream ? . Length ?? 0 ) . Result ;
74+ var routeParams = route ?? new Dictionary < string , string > ( ) ;
75+
76+ var parsed = HttpHelper . ReadAndFlattenHttpDataAsync ( routeParams , queryParams , headerDict , new Dictionary < string , string > ( ) , bodyStream , contentType , bodyStream ? . Length ?? 0 ) . Result ;
7477
7578 return new Context
7679 {
@@ -81,7 +84,7 @@ private Context CreateTestContext(
8184 Query = query ?? new Dictionary < string , string > ( ) ,
8285 RemoteAddress = "127.0.0.1" ,
8386 Url = "http://localhost/test" ,
84- RouteParams = new Dictionary < string , string > ( ) ,
87+ RouteParams = routeParams ,
8588 Cookies = new Dictionary < string , string > ( ) ,
8689 Source = "test" ,
8790 ParsedBody = parsed . ParsedBody ,
0 commit comments