1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2025-06-07 07:56:12 +00:00
This commit is contained in:
JKorf 2019-10-23 08:48:12 +02:00
parent bfdc83ffe5
commit 5bfabc34c2
11 changed files with 7 additions and 23 deletions

View File

@ -7,10 +7,7 @@ using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Text;
using CryptoExchange.Net.Interfaces;
using CryptoExchange.Net.RateLimiter;
@ -110,7 +107,8 @@ namespace CryptoExchange.Net.UnitTests
{
BaseAddress = "http://test.address.com",
RateLimiters = new List<IRateLimiter>{new RateLimiterTotal(1, TimeSpan.FromSeconds(1))},
RateLimitingBehaviour = RateLimitingBehaviour.Fail
RateLimitingBehaviour = RateLimitingBehaviour.Fail,
RequestTimeout = TimeSpan.FromMinutes(1)
});
@ -118,6 +116,7 @@ namespace CryptoExchange.Net.UnitTests
Assert.IsTrue(client.BaseAddress == "http://test.address.com");
Assert.IsTrue(client.RateLimiters.Count() == 1);
Assert.IsTrue(client.RateLimitBehaviour == RateLimitingBehaviour.Fail);
Assert.IsTrue(client.RequestTimeout == TimeSpan.FromMinutes(1));
}
[TestCase]

View File

@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using CryptoExchange.Net.Logging;
using CryptoExchange.Net.Objects;

View File

@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using System.Text;
namespace CryptoExchange.Net.UnitTests.TestImplementations
{

View File

@ -1,7 +1,4 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
namespace CryptoExchange.Net.UnitTests.TestImplementations
{

View File

@ -3,11 +3,9 @@ using CryptoExchange.Net.Objects;
using Moq;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Reflection;
using System.Text;
using System.Threading;

View File

@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.Security.Authentication;
using System.Text;
using System.Threading.Tasks;
using CryptoExchange.Net.Interfaces;
using WebSocket4Net;

View File

@ -1,7 +1,7 @@
#if !NETSTANDARD2_1
namespace System.Diagnostics.CodeAnalysis
{
using global::System;
using System;
/// <summary>
/// Specifies that <see langword="null"/> is allowed as an input even if the

View File

@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Newtonsoft.Json;

View File

@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading;
using System.Threading.Tasks;

View File

@ -1,5 +1,4 @@
using System;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;

View File

@ -47,13 +47,13 @@ namespace CryptoExchange.Net
/// <summary>
/// Timeout for requests
/// </summary>
protected TimeSpan RequestTimeout { get; }
public TimeSpan RequestTimeout { get; }
/// <summary>
/// Rate limiting behaviour
/// </summary>
public RateLimitingBehaviour RateLimitBehaviour { get; }
/// <summary>
/// List of ratelimitters
/// List of rate limiters
/// </summary>
public IEnumerable<IRateLimiter> RateLimiters { get; private set; }
/// <summary>