1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-23 06:13:09 +00:00

Fixed warnings in tests

This commit is contained in:
Jkorf
2026-06-30 15:25:08 +02:00
parent 6238c17471
commit 68ad9ae114
2 changed files with 3 additions and 2 deletions
@@ -31,7 +31,7 @@ namespace CryptoExchange.Net.UnitTests.ConverterTests
[TestCase(-1, false)] [TestCase(-1, false)]
public void TestBoolConverterInts(int value, bool? expected) public void TestBoolConverterInts(int value, bool? expected)
{ {
var val = value == null ? "null" : $"{value}"; var val = $"{value}";
var output = JsonSerializer.Deserialize<STJBoolObject>($"{{ \"Value\": {val} }}", SerializerOptions.WithConverters(new TestSerializerContext())); var output = JsonSerializer.Deserialize<STJBoolObject>($"{{ \"Value\": {val} }}", SerializerOptions.WithConverters(new TestSerializerContext()));
Assert.That(output!.Value == expected); Assert.That(output!.Value == expected);
} }
@@ -156,8 +156,9 @@ namespace CryptoExchange.Net.UnitTests.SocketRoutingTests
MessageRouter = messageRouter; MessageRouter = messageRouter;
} }
#pragma warning disable CS0067 // The event is never used, but it's required by the interface
public event Action? OnMessageRouterUpdated; public event Action? OnMessageRouterUpdated;
#pragma warning restore CS0067
public bool Handle(string typeIdentifier, string? topicFilter, SocketConnection socketConnection, DateTime receiveTime, string? originalData, object result) public bool Handle(string typeIdentifier, string? topicFilter, SocketConnection socketConnection, DateTime receiveTime, string? originalData, object result)
{ {
return true; return true;