mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2026-04-12 16:13:12 +00:00
Updated WebSocket message routing improving performance for scenarios with multiple different subscriptions and topics Added AddCommaSeparated helper for Enum value arrays to ParameterCollection Improved EnumConverter performance and removed string allocation for happy path Fixed CreateParamString extension method for ArrayParametersSerialization.Json Fixed Shared GetOrderBookOptions and GetRecentTradeOptions base validations not being called
31 lines
817 B
C#
31 lines
817 B
C#
using CryptoExchange.Net.Authentication;
|
|
using System;
|
|
|
|
namespace CryptoExchange.Net.UnitTests.Implementations
|
|
{
|
|
internal class TestCredentials : HMACCredential
|
|
{
|
|
public TestCredentials() { }
|
|
|
|
public TestCredentials(string key, string secret) : base(key, secret)
|
|
{
|
|
}
|
|
|
|
public TestCredentials(HMACCredential credential) : base(credential.Key, credential.Secret)
|
|
{
|
|
}
|
|
|
|
public TestCredentials WithHMAC(string key, string secret)
|
|
{
|
|
if (!string.IsNullOrEmpty(Key)) throw new InvalidOperationException("Credentials already set");
|
|
|
|
Key = key;
|
|
Secret = secret;
|
|
return this;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override ApiCredentials Copy() => new TestCredentials(this);
|
|
}
|
|
}
|