1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-15 18:33:06 +00:00

Added dedicated request websocket connection support

This commit is contained in:
JKorf
2024-06-16 16:55:44 +02:00
parent 64ee50d98c
commit 3e5a34fb56
7 changed files with 128 additions and 32 deletions
@@ -50,13 +50,15 @@ namespace CryptoExchange.Net.Testing
/// <param name="name">Method name for looking up json test values</param>
/// <param name="nestedJsonProperty">Use nested json property for compare</param>
/// <param name="ignoreProperties">Ignore certain properties</param>
/// <param name="addressPath">Path</param>
/// <returns></returns>
/// <exception cref="Exception"></exception>
public async Task ValidateAsync<TUpdate>(
Func<TClient, Action<DataEvent<TUpdate>>, Task<CallResult<UpdateSubscription>>> methodInvoke,
string name,
string? nestedJsonProperty = null,
List<string>? ignoreProperties = null)
List<string>? ignoreProperties = null,
string? addressPath = null)
{
var listener = new EnumValueTraceListener();
Trace.Listeners.Add(listener);
@@ -79,7 +81,7 @@ namespace CryptoExchange.Net.Testing
var data = Encoding.UTF8.GetString(buffer);
using var reader = new StringReader(data);
var socket = TestHelpers.ConfigureSocketClient(_client);
var socket = TestHelpers.ConfigureSocketClient(_client, addressPath == null ? _baseAddress : _baseAddress.AppendPath(addressPath));
var waiter = new AutoResetEvent(false);
string? lastMessage = null;