-
-
Notifications
You must be signed in to change notification settings - Fork 787
Expand file tree
/
Copy pathReflectionTests.cs
More file actions
546 lines (465 loc) · 23.8 KB
/
Copy pathReflectionTests.cs
File metadata and controls
546 lines (465 loc) · 23.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
// Copyright (c) 2019-2026 ReactiveUI and Contributors. All rights reserved.
// ReactiveUI and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
using Refit.Testing;
namespace Refit.Tests;
/// <summary>Tests that the reflection-based Refit implementation passes the expected attribute providers and types to the URL parameter formatter.</summary>
public sealed class ReflectionTests
{
/// <summary>The base address supplied to the reflection-based Refit service.</summary>
private const string BaseUrl = "https://foo";
/// <summary>The base address with a trailing slash used for expected request URLs.</summary>
private const string BaseUrlWithSlash = "https://foo/";
/// <summary>The query value exercised by the query parameter tests.</summary>
private const string QueryValue = "queryValue";
/// <summary>A constant value to use as a route parameter.</summary>
private const string RouteValue = "Empty";
/// <summary>A constant value to use as a route parameter.</summary>
private const int IntegerValue = 10;
/// <summary>A constant value to use as a route parameter.</summary>
private const long LongValue = 10L;
/// <summary>A Refit interface with many overloaded generic methods.</summary>
public interface IGenericMethod
{
/// <summary>Request with a generic route parameter.</summary>
/// <param name="value1">Generic route parameter.</param>
/// <typeparam name="T1">Generic type of route parameter.</typeparam>
/// <returns>A task that completes when the request finishes.</returns>
[Get("/{value1}")]
Task GetGenericParameter<T1>(T1 value1);
/// <summary>Request with a generic route parameter and additional parameter.</summary>
/// <param name="value1">Generic route parameter.</param>
/// <param name="value2">Integer route parameter.</param>
/// <typeparam name="T1">Generic type of route parameter.</typeparam>
/// <returns>A task that completes when the request finishes.</returns>
[Get("/{value1}/{value2}")]
Task GetGenericParameter<T1>(T1 value1, int value2);
/// <summary>Request with two generic route parameters.</summary>
/// <param name="value1">First generic route parameter.</param>
/// <param name="value2">Second generic route parameter.</param>
/// <typeparam name="T1">Generic type of first route parameter.</typeparam>
/// <typeparam name="T2">Generic type of second route parameter.</typeparam>
/// <returns>A task that completes when the request finishes.</returns>
[Get("/{value1}/{value2}")]
Task GetGenericParameter<T1, T2>(T1 value1, T2 value2);
}
/// <summary>A generic Refit interface with many overloaded generic methods.</summary>
/// <typeparam name="TInterface">Generic type of interface.</typeparam>
public interface IGenericMethodAndInterface<in TInterface>
{
/// <summary>Request with a generic route parameter.</summary>
/// <param name="value1">Generic route parameter.</param>
/// <typeparam name="T1">Generic type of route parameter.</typeparam>
/// <returns>A task that completes when the request finishes.</returns>
[Get("/{value1}")]
Task GetGenericParameter<T1>(T1 value1);
/// <summary>Request with a generic route parameter and additional parameter.</summary>
/// <param name="value1">Generic route parameter.</param>
/// <param name="value2">Integer route parameter.</param>
/// <typeparam name="T1">Generic type of route parameter, constrained to value types.</typeparam>
/// <returns>A task that completes when the request finishes.</returns>
[Get("/{value1}/{value2}")]
Task GetGenericParameter<T1>(T1 value1, int value2)
where T1 : struct;
/// <summary>Request with two generic route parameters.</summary>
/// <param name="value1">First generic route parameter.</param>
/// <param name="value2">Second generic route parameter.</param>
/// <typeparam name="T1">Generic type of first route parameter, constrained to reference types.</typeparam>
/// <returns>A task that completes when the request finishes.</returns>
[Get("/{value1}/{value2}")]
Task GetGenericParameter<T1>(T1 value1, TInterface value2)
where T1 : class;
}
/// <summary>Verifies a simple string path parameter is formatted with the expected metadata.</summary>
/// <returns>A task that represents the asynchronous test.</returns>
[Test]
public async Task UrlParameterShouldBeExpectedReflection()
{
var handler = new StubHttp
{
{
Route.Get("https://foo/bar"),
Reply.Json(nameof(IBasicApi.GetParam))
},
};
var methodInfo = typeof(IBasicApi).GetMethod(nameof(IBasicApi.GetParam))!;
var parameterInfo = methodInfo.GetParameters()[0];
var formatter = new TestUrlFormatter(parameterInfo, typeof(string));
var service = handler.CreateClient<IBasicApi>(BaseUrl, new RefitSettings { UrlParameterFormatter = formatter });
await service.GetParam("bar");
await formatter.AssertNoOutstandingAssertions();
}
/// <summary>Verifies a derived record path parameter is formatted with the expected metadata.</summary>
/// <returns>A task that represents the asynchronous test.</returns>
[Test]
public async Task DerivedUrlParameterShouldBeExpectedReflection()
{
var handler = new StubHttp
{
{
Route.Get("https://foo/DerivedRecord%20%7B%20Value%20%3D%20Derived%20%7D"),
Reply.Json(nameof(IBasicApi.GetDerivedParam))
},
};
var methodInfo = typeof(IBasicApi).GetMethod(nameof(IBasicApi.GetDerivedParam))!;
var parameterInfo = methodInfo.GetParameters()[0];
var formatter = new TestUrlFormatter(parameterInfo, typeof(BaseRecord));
var service = handler.CreateClient<IBasicApi>(BaseUrl, new RefitSettings { UrlParameterFormatter = formatter });
await service.GetDerivedParam(new DerivedRecord("Derived"));
await formatter.AssertNoOutstandingAssertions();
}
/// <summary>Verifies a record property path parameter is formatted with the expected metadata.</summary>
/// <returns>A task that represents the asynchronous test.</returns>
[Test]
public async Task PropertyParameterShouldBeExpectedReflection()
{
var handler = new StubHttp
{
{
Route.Get("https://foo/propVal"),
Reply.Json(nameof(IBasicApi.GetPropertyParam))
},
};
var propertyInfo = typeof(MyParams).GetProperties()[0];
var formatter = new TestUrlFormatter(propertyInfo, typeof(string));
var service = handler.CreateClient<IBasicApi>(BaseUrl, new RefitSettings { UrlParameterFormatter = formatter });
await service.GetPropertyParam(new("propVal"));
await formatter.AssertNoOutstandingAssertions();
}
/// <summary>Verifies a generic path parameter is formatted with the expected metadata.</summary>
/// <returns>A task that represents the asynchronous test.</returns>
[Test]
public async Task GenericParameterShouldBeExpectedReflection()
{
var handler = new StubHttp
{
{
Route.Get("https://foo/genericVal"),
Reply.Json(nameof(IBasicApi.GetGenericParam))
},
};
var methodInfo = typeof(IBasicApi).GetMethod(nameof(IBasicApi.GetGenericParam))!;
var stringMethod = methodInfo.MakeGenericMethod(typeof(string));
var parameterInfo = stringMethod.GetParameters()[0];
var formatter = new TestUrlFormatter(parameterInfo, typeof(string));
var service = handler.CreateClient<IBasicApi>(BaseUrl, new RefitSettings { UrlParameterFormatter = formatter });
await service.GetGenericParam("genericVal");
await formatter.AssertNoOutstandingAssertions();
}
/// <summary>Verifies a simple string query parameter is formatted with the expected metadata.</summary>
/// <returns>A task that represents the asynchronous test.</returns>
[Test]
public async Task QueryParameterShouldBeExpectedReflection()
{
var handler = new StubHttp
{
{
new RouteMatcher { Method = HttpMethod.Get, Template = BaseUrlWithSlash, ExactQueryParams = [("queryKey", QueryValue)] },
Reply.Json(nameof(IBasicApi.GetQuery))
},
};
var methodInfo = typeof(IBasicApi).GetMethod(nameof(IBasicApi.GetQuery))!;
var parameterInfo = methodInfo.GetParameters()[0];
var formatter = new TestUrlFormatter(parameterInfo, typeof(string));
var service = handler.CreateClient<IBasicApi>(BaseUrl, new RefitSettings { UrlParameterFormatter = formatter });
await service.GetQuery(QueryValue);
await formatter.AssertNoOutstandingAssertions();
}
/// <summary>Verifies a record property query parameter is formatted with the expected metadata.</summary>
/// <returns>A task that represents the asynchronous test.</returns>
[Test]
public async Task QueryPropertyParameterShouldBeExpectedReflection()
{
var handler = new StubHttp
{
{
new RouteMatcher { Method = HttpMethod.Get, Template = BaseUrlWithSlash, ExactQueryParams = [("Value", "queryVal")] },
Reply.Json(nameof(IBasicApi.GetPropertyQuery))
},
};
var methodInfo = typeof(IBasicApi).GetMethod(nameof(IBasicApi.GetPropertyQuery))!;
var parameterInfo = methodInfo.GetParameters()[0];
var formatter = new TestUrlFormatter(parameterInfo, typeof(BaseRecord));
var service = handler.CreateClient<IBasicApi>(BaseUrl, new RefitSettings { UrlParameterFormatter = formatter });
await service.GetPropertyQuery(new("queryVal"));
await formatter.AssertNoOutstandingAssertions();
}
/// <summary>Verifies a derived record's properties are formatted as query parameters with the expected metadata.</summary>
/// <returns>A task that represents the asynchronous test.</returns>
[Test]
public async Task DerivedQueryPropertyParameterShouldBeExpectedReflection()
{
var handler = new StubHttp
{
{
new RouteMatcher { Method = HttpMethod.Get, Template = BaseUrlWithSlash, ExactQueryParams = [("Name", "queryName"), ("Value", "value")] },
Reply.Json(nameof(IBasicApi.GetPropertyQuery))
},
};
var methodInfo = typeof(IBasicApi).GetMethod(nameof(IBasicApi.GetPropertyQuery))!;
var parameterInfo = methodInfo.GetParameters()[0];
var formatter = new TestUrlFormatter(
[parameterInfo, parameterInfo],
[typeof(BaseRecord), typeof(BaseRecord)]);
var service = handler.CreateClient<IBasicApi>(BaseUrl, new RefitSettings { UrlParameterFormatter = formatter });
await service.GetPropertyQuery(new DerivedRecordWithProperty("queryName"));
await formatter.AssertNoOutstandingAssertions();
}
/// <summary>Verifies a generic query parameter is formatted with the expected metadata.</summary>
/// <returns>A task that represents the asynchronous test.</returns>
[Test]
public async Task GenericQueryParameterShouldBeExpectedReflection()
{
var handler = new StubHttp
{
{
new RouteMatcher { Method = HttpMethod.Get, Template = BaseUrlWithSlash, ExactQueryParams = [("queryKey", QueryValue)] },
Reply.Json(nameof(IBasicApi.GetGenericQuery))
},
};
var methodInfo = typeof(IBasicApi).GetMethod(nameof(IBasicApi.GetGenericQuery))!;
var stringMethod = methodInfo.MakeGenericMethod(typeof(string));
var parameterInfo = stringMethod.GetParameters()[0];
var formatter = new TestUrlFormatter(parameterInfo, typeof(string));
var service = handler.CreateClient<IBasicApi>(BaseUrl, new RefitSettings { UrlParameterFormatter = formatter });
await service.GetGenericQuery(QueryValue);
await formatter.AssertNoOutstandingAssertions();
}
/// <summary>Verifies an enumerable query parameter is formatted with the expected metadata.</summary>
/// <returns>A task that represents the asynchronous test.</returns>
[Test]
public async Task EnumerableQueryParameterShouldBeExpectedReflection()
{
var handler = new StubHttp
{
{
new RouteMatcher { Method = HttpMethod.Get, Template = BaseUrlWithSlash, ExactQueryParams = [("enums", "k0,k1")] },
Reply.Json(nameof(IBasicApi.GetEnumerableQuery))
},
};
var methodInfo = typeof(IBasicApi).GetMethod(nameof(IBasicApi.GetEnumerableQuery))!;
var parameterInfo = methodInfo.GetParameters()[0];
var formatter = new TestUrlFormatter(
[parameterInfo, parameterInfo],
[typeof(IEnumerable<string>), typeof(IEnumerable<string>)]);
var service = handler.CreateClient<IBasicApi>(BaseUrl, new RefitSettings { UrlParameterFormatter = formatter });
await service.GetEnumerableQuery(["k0", "k1"]);
await formatter.AssertNoOutstandingAssertions();
}
/// <summary>Verifies a record's enumerable property is formatted as a query parameter with the expected metadata.</summary>
/// <returns>A task that represents the asynchronous test.</returns>
[Test]
public async Task EnumerablePropertyQueryParameterShouldBeExpectedReflection()
{
var handler = new StubHttp
{
{
new RouteMatcher { Method = HttpMethod.Get, Template = BaseUrlWithSlash, ExactQueryParams = [("Enumerable", "0,1")] },
Reply.Json(nameof(IBasicApi.GetEnumerablePropertyQuery))
},
};
var methodInfo = typeof(IBasicApi).GetMethod(nameof(IBasicApi.GetEnumerablePropertyQuery))!;
var parameterInfo = methodInfo.GetParameters()[0];
var propertyInfo = typeof(MyEnumerableParams).GetProperties()[0];
var formatter = new TestUrlFormatter(
[propertyInfo, propertyInfo, parameterInfo],
[typeof(int[]), typeof(int[]), typeof(MyEnumerableParams)]);
var service = handler.CreateClient<IBasicApi>(BaseUrl, new RefitSettings { UrlParameterFormatter = formatter });
await service.GetEnumerablePropertyQuery(new([0, 1]));
await formatter.AssertNoOutstandingAssertions();
}
/// <summary>Verifies a dictionary query parameter is formatted with the expected metadata.</summary>
/// <returns>A task that represents the asynchronous test.</returns>
[Test]
public async Task QueryDictionaryParameterShouldBeExpectedReflection()
{
var handler = new StubHttp
{
{
new RouteMatcher { Method = HttpMethod.Get, Template = BaseUrlWithSlash, ExactQueryParams = [("key0", "1"), ("key1", "2")] },
Reply.Json(nameof(IBasicApi.GetDictionaryQuery))
},
};
var methodInfo = typeof(IBasicApi).GetMethod(nameof(IBasicApi.GetDictionaryQuery))!;
var parameterInfo = methodInfo.GetParameters()[0];
var formatter = new TestUrlFormatter(
[typeof(string), typeof(string), parameterInfo, parameterInfo],
[
typeof(string),
typeof(string),
typeof(IDictionary<string, object>),
typeof(IDictionary<string, object>)
]);
var service = handler.CreateClient<IBasicApi>(BaseUrl, new RefitSettings { UrlParameterFormatter = formatter });
var dict = new Dictionary<string, object> { { "key0", 1 }, { "key1", 2 } };
await service.GetDictionaryQuery(dict);
await formatter.AssertNoOutstandingAssertions();
}
/// <summary>Verifies an overloaded generic path parameter is formatted with the expected metadata.</summary>
/// <returns>A task that represents the asynchronous test.</returns>
[Test]
public async Task OverloadedGenericParameterShouldBeExpectedReflection()
{
var handler = new StubHttp
{
{
Route.Get("https://foo/Empty"),
Reply.Json(nameof(IGenericMethod.GetGenericParameter))
},
};
var methodInfo = typeof(IGenericMethod).GetMethod(nameof(IGenericMethod.GetGenericParameter), 1, [Type.MakeGenericMethodParameter(0)])!;
var parameterInfo = methodInfo.MakeGenericMethod(typeof(string)).GetParameters()[0];
var formatter = new TestUrlFormatter(
[parameterInfo],
[typeof(string)]);
var settings = new RefitSettings
{
HttpMessageHandlerFactory = () => handler,
UrlParameterFormatter = formatter
};
var service = RestService.For<IGenericMethod>(BaseUrl, settings);
await service.GetGenericParameter(RouteValue);
await formatter.AssertNoOutstandingAssertions();
}
/// <summary>Verifies an overloaded generic path parameter is formatted with the expected metadata.</summary>
/// <returns>A task that represents the asynchronous test.</returns>
[Test]
public async Task OverloadedGenericParameterWithNonGenericShouldBeExpectedReflection()
{
var handler = new StubHttp
{
{
Route.Get("https://foo/Empty/10"),
Reply.Json(nameof(IGenericMethod.GetGenericParameter))
},
};
var methodInfo = typeof(IGenericMethod).GetMethod(nameof(IGenericMethod.GetGenericParameter), 1, [Type.MakeGenericMethodParameter(0), typeof(int)])!.MakeGenericMethod(typeof(string));
var parameterInfo1 = methodInfo.GetParameters()[0];
var parameterInfo2 = methodInfo.GetParameters()[1];
var formatter = new TestUrlFormatter(
[parameterInfo1, parameterInfo2],
[typeof(string), typeof(int)]);
var settings = new RefitSettings
{
HttpMessageHandlerFactory = () => handler,
UrlParameterFormatter = formatter
};
var service = RestService.For<IGenericMethod>(BaseUrl, settings);
await service.GetGenericParameter("Empty", IntegerValue);
await formatter.AssertNoOutstandingAssertions();
}
/// <summary>Verifies an overloaded generic path parameter is formatted with the expected metadata.</summary>
/// <returns>A task that represents the asynchronous test.</returns>
[Test]
public async Task OverloadedWithTwoGenericParameterShouldBeExpectedReflection()
{
var handler = new StubHttp
{
{
Route.Get("https://foo/Empty/10"),
Reply.Json(nameof(IGenericMethod.GetGenericParameter))
},
};
var methodInfo = typeof(IGenericMethod).GetMethod(nameof(IGenericMethod.GetGenericParameter), 2, [Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(1)])!;
methodInfo = methodInfo.MakeGenericMethod(typeof(string), typeof(long));
var parameterInfo1 = methodInfo.GetParameters()[0];
var parameterInfo2 = methodInfo.GetParameters()[1];
var formatter = new TestUrlFormatter(
[parameterInfo1, parameterInfo2],
[typeof(string), typeof(long)]);
var settings = new RefitSettings
{
HttpMessageHandlerFactory = () => handler,
UrlParameterFormatter = formatter
};
var service = RestService.For<IGenericMethod>(BaseUrl, settings);
await service.GetGenericParameter(RouteValue, LongValue);
await formatter.AssertNoOutstandingAssertions();
}
/// <summary>Verifies an overloaded generic path parameter is formatted with the expected metadata.</summary>
/// <returns>A task that represents the asynchronous test.</returns>
[Test]
public async Task GenericOverloadedInterfaceWithGenericParameterShouldBeExpectedReflection()
{
var handler = new StubHttp
{
{
Route.Get("https://foo/10"),
Reply.Json(nameof(IGenericMethodAndInterface<>.GetGenericParameter))
},
};
var methodInfo = typeof(IGenericMethodAndInterface<string>).GetMethod(nameof(IGenericMethodAndInterface<>.GetGenericParameter), 1, [Type.MakeGenericMethodParameter(0)])!;
methodInfo = methodInfo.MakeGenericMethod(typeof(int));
var parameterInfo1 = methodInfo.GetParameters()[0];
var formatter = new TestUrlFormatter(
[parameterInfo1],
[typeof(int)]);
var settings = new RefitSettings
{
HttpMessageHandlerFactory = () => handler,
UrlParameterFormatter = formatter
};
var service = RestService.For<IGenericMethodAndInterface<string>>(BaseUrl, settings);
await service.GetGenericParameter(IntegerValue);
await formatter.AssertNoOutstandingAssertions();
}
/// <summary>Verifies an overloaded generic path parameter is formatted with the expected metadata.</summary>
/// <returns>A task that represents the asynchronous test.</returns>
[Test]
public async Task GenericOverloadedInterfaceWithNonGenericShouldBeExpectedReflection()
{
var handler = new StubHttp
{
{
Route.Get("https://foo/10/10"),
Reply.Json(nameof(IGenericMethodAndInterface<>.GetGenericParameter))
},
};
var methodInfo = typeof(IGenericMethodAndInterface<string>).GetMethod(nameof(IGenericMethodAndInterface<>.GetGenericParameter), 1, [Type.MakeGenericMethodParameter(0), typeof(int)])!;
methodInfo = methodInfo.MakeGenericMethod(typeof(long));
var parameterInfo1 = methodInfo.GetParameters()[0];
var parameterInfo2 = methodInfo.GetParameters()[1];
var formatter = new TestUrlFormatter(
[parameterInfo1, parameterInfo2],
[typeof(long), typeof(int)]);
var settings = new RefitSettings
{
HttpMessageHandlerFactory = () => handler,
UrlParameterFormatter = formatter
};
var service = RestService.For<IGenericMethodAndInterface<string>>(BaseUrl, settings);
await service.GetGenericParameter(LongValue, IntegerValue);
await formatter.AssertNoOutstandingAssertions();
}
/// <summary>Verifies an overloaded generic path parameter is formatted with the expected metadata.</summary>
/// <returns>A task that represents the asynchronous test.</returns>
[Test]
public async Task GenericOverloadedInterfaceWithTwoGenericParameterShouldBeExpectedReflection()
{
var handler = new StubHttp
{
{
Route.Get("https://foo/10/Empty"),
Reply.Json(nameof(IGenericMethodAndInterface<>.GetGenericParameter))
},
};
var methodInfo = typeof(IGenericMethodAndInterface<string>).GetMethod(
nameof(IGenericMethodAndInterface<>.GetGenericParameter),
1,
[Type.MakeGenericMethodParameter(0), typeof(string)])!;
methodInfo = methodInfo.MakeGenericMethod(typeof(string));
var parameterInfo1 = methodInfo.GetParameters()[0];
var parameterInfo2 = methodInfo.GetParameters()[1];
var formatter = new TestUrlFormatter(
[parameterInfo1, parameterInfo2],
[typeof(string), typeof(string)]);
var settings = new RefitSettings
{
HttpMessageHandlerFactory = () => handler,
UrlParameterFormatter = formatter
};
var service = RestService.For<IGenericMethodAndInterface<string>>(BaseUrl, settings);
await service.GetGenericParameter<string>("10", "Empty");
await formatter.AssertNoOutstandingAssertions();
}
}