1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-15 10:22:57 +00:00

Disposable changes, fixed tests

This commit is contained in:
Jkorf
2021-11-30 10:31:45 +01:00
parent 69a6fabb79
commit 49de7e89cc
12 changed files with 154 additions and 73 deletions
@@ -22,7 +22,8 @@ namespace CryptoExchange.Net.UnitTests
// arrange
// act
// assert
Assert.Throws(typeof(ArgumentException), () => new TestBaseClient(new RestClientOptions() { ApiCredentials = new ApiCredentials(key, secret) }));
Assert.Throws(typeof(ArgumentException),
() => new RestSubClientOptions() { ApiCredentials = new ApiCredentials(key, secret) });
}
[TestCase]
@@ -112,19 +113,6 @@ namespace CryptoExchange.Net.UnitTests
Assert.IsTrue(result.Error != null);
}
[TestCase]
public void FillingPathParameters_Should_ResultInValidUrl()
{
// arrange
var client = new TestBaseClient();
// act
var result = client.FillParameters("http://test.api/{}/path/{}", "1", "test");
// assert
Assert.IsTrue(result == "http://test.api/1/path/test");
}
[TestCase("https://api.test.com/api", new[] { "path1", "path2" }, "https://api.test.com/api/path1/path2")]
[TestCase("https://api.test.com/api", new[] { "path1", "/path2" }, "https://api.test.com/api/path1/path2")]
[TestCase("https://api.test.com/api", new[] { "path1/", "path2" }, "https://api.test.com/api/path1/path2")]