Skip to content

Commit 6536b20

Browse files
committed
fix(tests): replace obsolete SelectAwait with Select in HttpClientTests
Remove conditional compilation and use Select with CancellationToken parameter for all target frameworks (net8.0, net9.0, net10.0) to resolve CS0618 warning about obsolete AsyncEnumerableDeprecated.SelectAwait. The modern Select overload is available in both System.Linq.Async (for net8.0/net9.0) and System.Linq.AsyncEnumerable (for net10.0).
1 parent c24cecb commit 6536b20

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/Devlead.Testing.MockHttp.Tests/Unit/HttpClientTests.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,8 @@ public async Task Send(params string[] methods)
9292
// When
9393
var result = await methods
9494
.ToAsyncEnumerable()
95-
#if NET10_0_OR_GREATER
9695
.Select(
9796
async (method, _, _)
98-
#else
99-
.SelectAwait(
100-
async method
101-
#endif
10297
=> await httpClient.SendAsync(
10398
new HttpRequestMessage(
10499
new HttpMethod(method),

0 commit comments

Comments
 (0)