1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2026-04-07 10:11:10 +00:00
2026-03-31 21:42:31 +02:00

35 lines
1.5 KiB
C#

using NUnit.Framework;
namespace CryptoExchange.Net.UnitTests.ClientTests
{
[TestFixture()]
public class BaseClientTests
{
//[TestCase]
//public void DeserializingValidJson_Should_GiveSuccessfulResult()
//{
// // arrange
// var client = new TestBaseClient();
// // act
// var result = client.SubClient.Deserialize<object>("{\"testProperty\": 123}");
// // assert
// Assert.That(result.Success);
//}
[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")]
[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", new[] { "test-path/test-path" }, "https://api.test.com/test-path/test-path")]
[TestCase("https://api.test.com/", new[] { "test-path/test-path" }, "https://api.test.com/test-path/test-path")]
public void AppendPathTests(string baseUrl, string[] path, string expected)
{
var result = baseUrl.AppendPath(path);
Assert.That(expected == result);
}
}
}