diff --git a/CryptoExchange.Net/Testing/Implementations/TestRequest.cs b/CryptoExchange.Net/Testing/Implementations/TestRequest.cs index 91a7114..5f4d9b8 100644 --- a/CryptoExchange.Net/Testing/Implementations/TestRequest.cs +++ b/CryptoExchange.Net/Testing/Implementations/TestRequest.cs @@ -10,6 +10,7 @@ namespace CryptoExchange.Net.Testing.Implementations { internal class TestRequest : IRequest { + private readonly Dictionary> _headers = new Dictionary>(); private readonly TestResponse _response; public string Accept { set { } } @@ -31,9 +32,10 @@ namespace CryptoExchange.Net.Testing.Implementations public void AddHeader(string key, string value) { + _headers.Add(key, new[] { value }); } - public Dictionary> GetHeaders() => new(); + public Dictionary> GetHeaders() => _headers; public Task GetResponseAsync(CancellationToken cancellationToken) => Task.FromResult(_response); diff --git a/CryptoExchange.Net/Testing/RestRequestValidator.cs b/CryptoExchange.Net/Testing/RestRequestValidator.cs index 6865fb9..701bb54 100644 --- a/CryptoExchange.Net/Testing/RestRequestValidator.cs +++ b/CryptoExchange.Net/Testing/RestRequestValidator.cs @@ -170,8 +170,9 @@ namespace CryptoExchange.Net.Testing var expectedMethod = reader.ReadLine(); var expectedPath = reader.ReadLine(); var expectedAuth = bool.Parse(reader.ReadLine()!); + var response = reader.ReadToEnd(); - TestHelpers.ConfigureRestClient(_client, "", System.Net.HttpStatusCode.OK); + TestHelpers.ConfigureRestClient(_client, response, System.Net.HttpStatusCode.OK); var result = await methodInvoke(_client).ConfigureAwait(false); // Check request/response properties