Move class to its own file
ADD
WalletWasabi.Tests/UnitTests/WabiSabi/Integration/StuttererHttpClient.cs
+using Microsoft.AspNetCore.Hosting;
+using NBitcoin;
+using System.Net.Http;
+using System.Threading;
+using System.Threading.Tasks;
+using WalletWasabi.Tests.Helpers;
+using Xunit;
+
+namespace WalletWasabi.Tests.UnitTests.WabiSabi.Integration;
+
+public class StuttererHttpClient : HttpClientWrapper
+{
+ public StuttererHttpClient(HttpClient httpClient) : base(httpClient)
+ {
+ }
+
+ public override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken token = default)
+ {
+ using HttpRequestMessage requestClone1 = request.Clone();
+ using HttpRequestMessage requestClone2 = request.Clone();
+
+ HttpResponseMessage result1 = await base.SendAsync(requestClone1, token).ConfigureAwait(false);
+ HttpResponseMessage result2 = await base.SendAsync(requestClone2, token).ConfigureAwait(false);
+
+ string content1 = await result1.Content.ReadAsStringAsync(token).ConfigureAwait(false);
+ string content2 = await result2.Content.ReadAsStringAsync(token).ConfigureAwait(false);
+
+ Assert.Equal(content1, content2);
+ return result2;
+ }
+}

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Integration/WabiSabiHttpApiIntegrationTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Integration/WabiSabiHttpApiIntegrationTests.cs
using System.Collections.Immutable;
-using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Moq;
using NBitcoin;
@@ -571,25 +570,3 @@ public class WabiSabiHttpApiIntegrationTests : IClassFixture<WabiSabiApiApplicat
Assert.NotEqual(Guid.Empty, response.Value);
}
}
-
-public class StuttererHttpClient : HttpClientWrapper
-{
- public StuttererHttpClient(HttpClient httpClient) : base(httpClient)
- {
- }
-
- public override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken token = default)
- {
- using HttpRequestMessage requestClone1 = request.Clone();
- using HttpRequestMessage requestClone2 = request.Clone();
-
- HttpResponseMessage result1 = await base.SendAsync(requestClone1, token).ConfigureAwait(false);
- HttpResponseMessage result2 = await base.SendAsync(requestClone2, token).ConfigureAwait(false);
-
- string content1 = await result1.Content.ReadAsStringAsync(token).ConfigureAwait(false);
- string content2 = await result2.Content.ReadAsStringAsync(token).ConfigureAwait(false);
-
- Assert.Equal(content1, content2);
- return result2;
- }
-}

Move class to its own file