From 04f90a546c740305fdc528371a7a5bc5b5c529f1 Mon Sep 17 00:00:00 2001 From: Tomas Date: Tue, 29 Sep 2026 21:18:29 +0200 Subject: [PATCH] Upgrade NuGet packages --- .../NetDaemon.AppModel.Tests.csproj | 10 +++++----- .../Helpers/LoggerMockExtensions.cs | 4 ++-- .../HomeAssistantConnectionTests.cs | 4 ++-- .../NetDaemon.HassClient.Tests.csproj | 12 ++++++------ .../NetDaemon.Extensions.Scheduling.Tests.csproj | 10 +++++----- .../Internal/AppScopedHaContextProviderTest.cs | 2 +- .../NetDaemon.HassModel.Tests.csproj | 10 +++++----- .../NetDaemon.Runtime.Tests.csproj | 10 +++++----- .../NetDaemon.Tests.Integration.csproj | 8 ++++---- 9 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/AppModel/NetDaemon.AppModel.Tests/NetDaemon.AppModel.Tests.csproj b/src/AppModel/NetDaemon.AppModel.Tests/NetDaemon.AppModel.Tests.csproj index 793d1686b..f491d67bf 100644 --- a/src/AppModel/NetDaemon.AppModel.Tests/NetDaemon.AppModel.Tests.csproj +++ b/src/AppModel/NetDaemon.AppModel.Tests/NetDaemon.AppModel.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -15,19 +15,19 @@ - + - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Client/NetDaemon.HassClient.Tests/Helpers/LoggerMockExtensions.cs b/src/Client/NetDaemon.HassClient.Tests/Helpers/LoggerMockExtensions.cs index 50498ae39..1e208c5cb 100644 --- a/src/Client/NetDaemon.HassClient.Tests/Helpers/LoggerMockExtensions.cs +++ b/src/Client/NetDaemon.HassClient.Tests/Helpers/LoggerMockExtensions.cs @@ -4,7 +4,7 @@ public static class LoggerMockExtensions { public static Mock> VerifyWarningWasCalled(this Mock> logger, string expectedMessage) { - Func state = (v, t) => string.Equals(v.ToString(), expectedMessage, StringComparison.Ordinal); + Func state = (v, t) => string.Equals(v?.ToString(), expectedMessage, StringComparison.Ordinal); logger.Verify( x => x.Log( @@ -18,7 +18,7 @@ public static Mock> VerifyWarningWasCalled(this Mock> l public static Mock> VerifyErrorWasCalled(this Mock> logger, string expectedMessage) { - Func state = (v, t) => string.Equals(v.ToString(), expectedMessage, StringComparison.Ordinal); + Func state = (v, t) => string.Equals(v?.ToString(), expectedMessage, StringComparison.Ordinal); logger.Verify( x => x.Log( diff --git a/src/Client/NetDaemon.HassClient.Tests/HomeAssistantClientTest/HomeAssistantConnectionTests.cs b/src/Client/NetDaemon.HassClient.Tests/HomeAssistantClientTest/HomeAssistantConnectionTests.cs index d341a086a..49b7eb31c 100644 --- a/src/Client/NetDaemon.HassClient.Tests/HomeAssistantClientTest/HomeAssistantConnectionTests.cs +++ b/src/Client/NetDaemon.HassClient.Tests/HomeAssistantClientTest/HomeAssistantConnectionTests.cs @@ -410,7 +410,7 @@ await Assert.ThrowsAnyAsync( x => x.Log( LogLevel.Error, It.IsAny(), - It.Is((v, _) => v.ToString() == "Message pump stopped unexpectedly, closing the Home Assistant connection"), + It.Is((v, _) => v != null && v.ToString() == "Message pump stopped unexpectedly, closing the Home Assistant connection"), transportException, It.IsAny>()), Times.Once); @@ -447,7 +447,7 @@ public async Task MessagePumpFailureWhileDisposingShouldNotBeLoggedAsError() x => x.Log( LogLevel.Debug, It.IsAny(), - It.Is((v, _) => v.ToString() == "Message pump stopped while disposing the Home Assistant connection"), + It.Is((v, _) => v != null && v.ToString() == "Message pump stopped while disposing the Home Assistant connection"), transportException, It.IsAny>()), Times.Once); diff --git a/src/Client/NetDaemon.HassClient.Tests/NetDaemon.HassClient.Tests.csproj b/src/Client/NetDaemon.HassClient.Tests/NetDaemon.HassClient.Tests.csproj index ab187d1ba..916b0b187 100644 --- a/src/Client/NetDaemon.HassClient.Tests/NetDaemon.HassClient.Tests.csproj +++ b/src/Client/NetDaemon.HassClient.Tests/NetDaemon.HassClient.Tests.csproj @@ -1,27 +1,27 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Extensions/NetDaemon.Extensions.Scheduling.Tests/NetDaemon.Extensions.Scheduling.Tests.csproj b/src/Extensions/NetDaemon.Extensions.Scheduling.Tests/NetDaemon.Extensions.Scheduling.Tests.csproj index f50b2d3cd..2b4dab0d8 100644 --- a/src/Extensions/NetDaemon.Extensions.Scheduling.Tests/NetDaemon.Extensions.Scheduling.Tests.csproj +++ b/src/Extensions/NetDaemon.Extensions.Scheduling.Tests/NetDaemon.Extensions.Scheduling.Tests.csproj @@ -1,21 +1,21 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/src/HassModel/NetDaemon.HassModel.Tests/Internal/AppScopedHaContextProviderTest.cs b/src/HassModel/NetDaemon.HassModel.Tests/Internal/AppScopedHaContextProviderTest.cs index 1a3f4a5c0..5672c1fe2 100644 --- a/src/HassModel/NetDaemon.HassModel.Tests/Internal/AppScopedHaContextProviderTest.cs +++ b/src/HassModel/NetDaemon.HassModel.Tests/Internal/AppScopedHaContextProviderTest.cs @@ -245,7 +245,7 @@ public async Task EventsAndFilter_ShowsOnlyMatchingEventsAsCorrectType() // Assert typedEventObserverMock.Verify(e => e.OnNext(It.IsAny>()), Times.Once); typedEventObserverMock.Verify(e => e.OnCompleted(), Times.Once); - var @event = (Event)typedEventObserverMock.Invocations[0].Arguments[0]; + var @event = Assert.IsType>(typedEventObserverMock.Invocations[0].Arguments[0]); @event.Data!.command.Should().Be("flip"); @event.Data!.endpoint_id.Should().Be(2); diff --git a/src/HassModel/NetDaemon.HassModel.Tests/NetDaemon.HassModel.Tests.csproj b/src/HassModel/NetDaemon.HassModel.Tests/NetDaemon.HassModel.Tests.csproj index 69bdf1793..3b1dae09d 100644 --- a/src/HassModel/NetDaemon.HassModel.Tests/NetDaemon.HassModel.Tests.csproj +++ b/src/HassModel/NetDaemon.HassModel.Tests/NetDaemon.HassModel.Tests.csproj @@ -1,16 +1,16 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - + @@ -18,11 +18,11 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Runtime/NetDaemon.Runtime.Tests/NetDaemon.Runtime.Tests.csproj b/src/Runtime/NetDaemon.Runtime.Tests/NetDaemon.Runtime.Tests.csproj index 106839e98..b26b78807 100644 --- a/src/Runtime/NetDaemon.Runtime.Tests/NetDaemon.Runtime.Tests.csproj +++ b/src/Runtime/NetDaemon.Runtime.Tests/NetDaemon.Runtime.Tests.csproj @@ -1,7 +1,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -10,19 +10,19 @@ - + - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/tests/Integration/NetDaemon.Tests.Integration/NetDaemon.Tests.Integration.csproj b/tests/Integration/NetDaemon.Tests.Integration/NetDaemon.Tests.Integration.csproj index 000ebd1ee..a378ff2c3 100644 --- a/tests/Integration/NetDaemon.Tests.Integration/NetDaemon.Tests.Integration.csproj +++ b/tests/Integration/NetDaemon.Tests.Integration/NetDaemon.Tests.Integration.csproj @@ -1,13 +1,13 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + @@ -16,11 +16,11 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all