1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-11-05 01:37:50 +00:00

Updated test error messages

This commit is contained in:
Jkorf
2026-11-03 13:34:22 +01:00
parent 7338513f81
commit 2ef4dd8555
@@ -202,7 +202,7 @@ namespace CryptoExchange.Net.Testing
private void CompareParameters(Dictionary<string, object> expectedUrlParameters, Dictionary<string, object> parameters, List<string>? ignoreParamValidation) private void CompareParameters(Dictionary<string, object> expectedUrlParameters, Dictionary<string, object> parameters, List<string>? ignoreParamValidation)
{ {
if (expectedUrlParameters.Count > parameters.Count) if (expectedUrlParameters.Count > parameters.Count)
throw new Exception($"Url parameters count not matched. Expected: {expectedUrlParameters.Count}, Actual: {parameters.Count}"); throw new Exception($"Parameters count not matched. Expected: {expectedUrlParameters.Count}, Actual: {parameters.Count}");
foreach (var kvp in expectedUrlParameters) foreach (var kvp in expectedUrlParameters)
{ {
@@ -210,10 +210,10 @@ namespace CryptoExchange.Net.Testing
continue; continue;
if (!parameters.TryGetValue(kvp.Key, out var value)) if (!parameters.TryGetValue(kvp.Key, out var value))
throw new Exception($"Url parameter {kvp.Key} not found in actual parameters"); throw new Exception($"Parameter {kvp.Key} not found in actual parameters");
if (Convert.ToString(kvp.Value, CultureInfo.InvariantCulture) != Convert.ToString(value, CultureInfo.InvariantCulture)) if (Convert.ToString(kvp.Value, CultureInfo.InvariantCulture) != Convert.ToString(value, CultureInfo.InvariantCulture))
throw new Exception($"Url parameter {kvp.Key} value not matched. Expected: {kvp.Value}, Actual: {value}"); throw new Exception($"Parameter {kvp.Key} value not matched. Expected: {kvp.Value}, Actual: {value}");
} }
} }