From 930828e5ffd9707553f37cd93b6359e19e119971 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 9 Aug 2026 22:50:13 +0000 Subject: [PATCH 1/2] Bump the nuget group with 9 updates Bumps jetbrains.resharper.globaltools from 2026.2.0.1 to 2026.2.0.2 Bumps NSubstitute from 6.0.0 to 6.1.0 Bumps Roslynator.Analyzers from 4.15.0 to 4.16.0 Bumps Roslynator.Formatting.Analyzers from 4.15.0 to 4.16.0 Bumps RustPlusApi from 2.0.0-beta.6 to 2.0.0-beta.7 Bumps RustPlusApi.Fcm from 2.0.0-beta.6 to 2.0.0-beta.7 Bumps SkiaSharp from 4.151.0 to 4.151.1 Bumps SkiaSharp.NativeAssets.Linux.NoDependencies from 4.151.0 to 4.151.1 Bumps Svg.Skia from 5.1.1 to 5.2.0 --- updated-dependencies: - dependency-name: jetbrains.resharper.globaltools dependency-version: 2026.2.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: nuget - dependency-name: NSubstitute dependency-version: 6.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: nuget - dependency-name: Roslynator.Analyzers dependency-version: 4.16.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: nuget - dependency-name: Roslynator.Formatting.Analyzers dependency-version: 4.16.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: nuget - dependency-name: RustPlusApi dependency-version: 2.0.0-beta.7 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: nuget - dependency-name: RustPlusApi.Fcm dependency-version: 2.0.0-beta.7 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: nuget - dependency-name: SkiaSharp dependency-version: 4.151.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: nuget - dependency-name: SkiaSharp.NativeAssets.Linux.NoDependencies dependency-version: 4.151.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: nuget - dependency-name: Svg.Skia dependency-version: 5.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: nuget ... Signed-off-by: dependabot[bot] --- .config/dotnet-tools.json | 2 +- Directory.Packages.props | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 0732e7f..800e41f 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -10,7 +10,7 @@ "rollForward": false }, "jetbrains.resharper.globaltools": { - "version": "2026.2.0.1", + "version": "2026.2.0.2", "commands": [ "jb" ], diff --git a/Directory.Packages.props b/Directory.Packages.props index 121b49f..6dcae22 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -15,21 +15,21 @@ - - + + - - + + - + @@ -37,15 +37,15 @@ - + - - + + From dd1205361994477ee898dc2d98adaacc77a11a03 Mon Sep 17 00:00:00 2001 From: = Date: Mon, 10 Aug 2026 14:21:01 +0200 Subject: [PATCH 2/2] fix(tests): drop null-forgiving operators redundant under NSubstitute 6.1 NSubstitute 6.1.0 reverted the nullability annotations added in 6.0, so the Arg.Is predicate parameter is no longer nullable. The `x!.` suppressions in the matcher lambdas became redundant and tripped S8969 as a build error. Co-Authored-By: Claude Opus 5 (1M context) --- .../AlarmStateRelayTests.cs | 4 ++-- .../Hosting/AlarmsHostedServiceTests.cs | 2 +- .../Hosting/EventsHostedServiceTickTests.cs | 2 +- .../RustMaps/RustMapsGenerationDriverTests.cs | 2 +- .../AccountDisconnectServiceTests.cs | 4 ++-- .../DiscordOwnerNotifierTests.cs | 4 ++-- .../PairingHandlerTests.cs | 8 ++++---- .../ServerPairingCoordinatorTests.cs | 4 ++-- .../Hosting/PlayersHostedServiceTests.cs | 4 ++-- .../PlayerEventRelayTests.cs | 2 +- .../StorageMonitorStateRelayTests.cs | 2 +- .../WipeAnnouncerTests.cs | 4 ++-- 12 files changed, 21 insertions(+), 21 deletions(-) diff --git a/tests/RustPlusBot.Features.Alarms.Tests/AlarmStateRelayTests.cs b/tests/RustPlusBot.Features.Alarms.Tests/AlarmStateRelayTests.cs index f91897e..f3a1c24 100644 --- a/tests/RustPlusBot.Features.Alarms.Tests/AlarmStateRelayTests.cs +++ b/tests/RustPlusBot.Features.Alarms.Tests/AlarmStateRelayTests.cs @@ -373,9 +373,9 @@ await h.Relay.HandleConnectionStatusAsync( CancellationToken.None); await h.Refresher.Received(1).RefreshAsync( - Arg.Is(a => a!.EntityId == 42UL), unreachable: true, Arg.Any()); + Arg.Is(a => a.EntityId == 42UL), unreachable: true, Arg.Any()); await h.Refresher.Received(1).RefreshAsync( - Arg.Is(a => a!.EntityId == 43UL), unreachable: true, Arg.Any()); + Arg.Is(a => a.EntityId == 43UL), unreachable: true, Arg.Any()); } /// Connected server → no-op (supervisor's prime path handles it). diff --git a/tests/RustPlusBot.Features.Alarms.Tests/Hosting/AlarmsHostedServiceTests.cs b/tests/RustPlusBot.Features.Alarms.Tests/Hosting/AlarmsHostedServiceTests.cs index ecff695..1e1aaf0 100644 --- a/tests/RustPlusBot.Features.Alarms.Tests/Hosting/AlarmsHostedServiceTests.cs +++ b/tests/RustPlusBot.Features.Alarms.Tests/Hosting/AlarmsHostedServiceTests.cs @@ -198,7 +198,7 @@ await h.Bus.PublishAsync( } await h.Refresher.Received().RefreshAsync( - Arg.Is(a => a!.EntityId == 42UL), unreachable: true, Arg.Any()); + Arg.Is(a => a.EntityId == 42UL), unreachable: true, Arg.Any()); await h.Service.StopAsync(default); } diff --git a/tests/RustPlusBot.Features.Events.Tests/Hosting/EventsHostedServiceTickTests.cs b/tests/RustPlusBot.Features.Events.Tests/Hosting/EventsHostedServiceTickTests.cs index 26783a2..e7d6e3d 100644 --- a/tests/RustPlusBot.Features.Events.Tests/Hosting/EventsHostedServiceTickTests.cs +++ b/tests/RustPlusBot.Features.Events.Tests/Hosting/EventsHostedServiceTickTests.cs @@ -28,7 +28,7 @@ public async Task TickOnce_publishes_a_crate_lootable_event_when_active_window_e await service.TickOnceAsync(CancellationToken.None); await bus.Received(1).PublishAsync( - Arg.Is(e => e!.Kind == RigEventKind.CrateLootable && e.Rig == RigKind.Small), + Arg.Is(e => e.Kind == RigEventKind.CrateLootable && e.Rig == RigKind.Small), Arg.Any()); } diff --git a/tests/RustPlusBot.Features.Map.Tests/RustMaps/RustMapsGenerationDriverTests.cs b/tests/RustPlusBot.Features.Map.Tests/RustMaps/RustMapsGenerationDriverTests.cs index 7e8c5c5..518e5aa 100644 --- a/tests/RustPlusBot.Features.Map.Tests/RustMaps/RustMapsGenerationDriverTests.cs +++ b/tests/RustPlusBot.Features.Map.Tests/RustMaps/RustMapsGenerationDriverTests.cs @@ -87,7 +87,7 @@ public async Task NotFound_with_budget_generates_exactly_once_across_ticks() Assert.Equal(RustMapsGenerationState.Generating, coord.Snapshot(Key).State); await client.Received(1).CreateMapAsync( - Arg.Is(r => r!.Size == 4000 && r.Seed == 12345 && !r.Staging), + Arg.Is(r => r.Size == 4000 && r.Seed == 12345 && !r.Staging), Arg.Any()); } diff --git a/tests/RustPlusBot.Features.Pairing.Tests/AccountDisconnectServiceTests.cs b/tests/RustPlusBot.Features.Pairing.Tests/AccountDisconnectServiceTests.cs index eae4b18..096633e 100644 --- a/tests/RustPlusBot.Features.Pairing.Tests/AccountDisconnectServiceTests.cs +++ b/tests/RustPlusBot.Features.Pairing.Tests/AccountDisconnectServiceTests.cs @@ -49,10 +49,10 @@ public async Task Disconnect_StopsListener_DisablesRegistration_RemovesCreds_Pub await sup.Received(1).StopListenerAsync(10UL, 99UL); await regs.Received(1).SetStatusAsync(regId, FcmRegistrationStatus.Disabled, Arg.Any()); await bus.Received(1).PublishAsync( - Arg.Is(e => e!.GuildId == 10UL && e.ServerId == s1), + Arg.Is(e => e.GuildId == 10UL && e.ServerId == s1), Arg.Any()); await bus.Received(1).PublishAsync( - Arg.Is(e => e!.ServerId == s2), Arg.Any()); + Arg.Is(e => e.ServerId == s2), Arg.Any()); } [Fact] diff --git a/tests/RustPlusBot.Features.Pairing.Tests/DiscordOwnerNotifierTests.cs b/tests/RustPlusBot.Features.Pairing.Tests/DiscordOwnerNotifierTests.cs index 194daa2..1a88137 100644 --- a/tests/RustPlusBot.Features.Pairing.Tests/DiscordOwnerNotifierTests.cs +++ b/tests/RustPlusBot.Features.Pairing.Tests/DiscordOwnerNotifierTests.cs @@ -16,7 +16,7 @@ public async Task NotifyCredentialsExpired_DmsTheOwner() await dm.Received(1).SendAsync( 99UL, - Arg.Is(m => m!.Contains("Reconnect", StringComparison.Ordinal)), + Arg.Is(m => m.Contains("Reconnect", StringComparison.Ordinal)), Arg.Any()); } @@ -29,6 +29,6 @@ public async Task NotifySetupChannelMissing_dms_owner_with_setup_instructions() await notifier.NotifySetupChannelMissingAsync(10UL, 99UL, CancellationToken.None); await dm.Received(1).SendAsync(99UL, - Arg.Is(m => m!.Contains("/setup", StringComparison.Ordinal)), Arg.Any()); + Arg.Is(m => m.Contains("/setup", StringComparison.Ordinal)), Arg.Any()); } } diff --git a/tests/RustPlusBot.Features.Pairing.Tests/PairingHandlerTests.cs b/tests/RustPlusBot.Features.Pairing.Tests/PairingHandlerTests.cs index 2781431..047ef55 100644 --- a/tests/RustPlusBot.Features.Pairing.Tests/PairingHandlerTests.cs +++ b/tests/RustPlusBot.Features.Pairing.Tests/PairingHandlerTests.cs @@ -73,7 +73,7 @@ public async Task NewServerPairing_RoutesToCoordinator_PersistsNothing() await handler.HandleAsync(10UL, 99UL, ServerPairing(), CancellationToken.None); await coordinator.Received(1).HandleDetectedAsync(10UL, 99UL, - Arg.Is(n => n!.Ip == "1.2.3.4" && n.Port == 28015), Arg.Any()); + Arg.Is(n => n.Ip == "1.2.3.4" && n.Port == 28015), Arg.Any()); Assert.Empty(await context.RustServers.ToListAsync()); Assert.Empty(await context.PlayerCredentials.ToListAsync()); await bus.DidNotReceive().PublishAsync(Arg.Any(), Arg.Any()); @@ -128,7 +128,7 @@ public async Task EntityPairing_KnownServer_PublishesSwitchPairedEvent() await handler.HandleAsync(10UL, 1UL, EntityPairing(FpServer, entityId: 42UL), CancellationToken.None); await bus.Received(1).PublishAsync( - Arg.Is(e => e!.GuildId == 10UL && e.ServerId == server.Id && e.EntityId == 42UL), + Arg.Is(e => e.GuildId == 10UL && e.ServerId == server.Id && e.EntityId == 42UL), Arg.Any()); } @@ -160,7 +160,7 @@ public async Task EntityPairing_Alarm_PublishesAlarmPairedEvent_NotSwitch() await handler.HandleAsync(10UL, 1UL, AlarmPairing(FpServer, 55UL), CancellationToken.None); await bus.Received(1).PublishAsync( - Arg.Is(e => e!.ServerId == server.Id && e.EntityId == 55UL), + Arg.Is(e => e.ServerId == server.Id && e.EntityId == 55UL), Arg.Any()); await bus.DidNotReceive().PublishAsync(Arg.Any(), Arg.Any()); } @@ -178,7 +178,7 @@ public async Task EntityPairing_StorageMonitor_PublishesStorageMonitorPairedEven await handler.HandleAsync(10UL, 1UL, StorageMonitorPairing(FpServer, 77UL), CancellationToken.None); await bus.Received(1).PublishAsync( - Arg.Is(e => e!.ServerId == server.Id && e.EntityId == 77UL), + Arg.Is(e => e.ServerId == server.Id && e.EntityId == 77UL), Arg.Any()); await bus.DidNotReceive().PublishAsync(Arg.Any(), Arg.Any()); } diff --git a/tests/RustPlusBot.Features.Pairing.Tests/ServerPairingCoordinatorTests.cs b/tests/RustPlusBot.Features.Pairing.Tests/ServerPairingCoordinatorTests.cs index 93c7155..c181514 100644 --- a/tests/RustPlusBot.Features.Pairing.Tests/ServerPairingCoordinatorTests.cs +++ b/tests/RustPlusBot.Features.Pairing.Tests/ServerPairingCoordinatorTests.cs @@ -167,7 +167,7 @@ public async Task Accept_persists_publishes_event_once_and_edits_prompt() Assert.Equal(server.Id, credential.RustServerId); Assert.Equal(CredentialStatus.Active, credential.Status); await h.Bus.Received(1).PublishAsync( - Arg.Is(e => e!.GuildId == 10UL && e.ServerId == server.Id), + Arg.Is(e => e.GuildId == 10UL && e.ServerId == server.Id), Arg.Any()); await h.Poster.Received(1).EnsureAsync(777UL, 900UL, Arg.Any(), Arg.Any(), Arg.Any()); @@ -279,7 +279,7 @@ public async Task Accept_without_setup_channel_still_persists_and_skips_edit() Assert.Equal(server.Id, credential.RustServerId); Assert.Equal(CredentialStatus.Active, credential.Status); await h.Bus.Received(1).PublishAsync( - Arg.Is(e => e!.GuildId == 10UL && e.ServerId == server.Id), + Arg.Is(e => e.GuildId == 10UL && e.ServerId == server.Id), Arg.Any()); await h.Poster.Received(1).EnsureAsync(Arg.Any(), Arg.Any(), Arg.Any(), Arg.Any(), diff --git a/tests/RustPlusBot.Features.Players.Tests/Hosting/PlayersHostedServiceTests.cs b/tests/RustPlusBot.Features.Players.Tests/Hosting/PlayersHostedServiceTests.cs index 1c5b2a7..a712d3b 100644 --- a/tests/RustPlusBot.Features.Players.Tests/Hosting/PlayersHostedServiceTests.cs +++ b/tests/RustPlusBot.Features.Players.Tests/Hosting/PlayersHostedServiceTests.cs @@ -72,7 +72,7 @@ await h.Bus.PublishAsync(new PlayerStateChangedEvent( } await h.Sender.Received().SendAsync( - 10UL, serverId, Arg.Is(s => s!.Contains("Alice")), Arg.Any()); + 10UL, serverId, Arg.Is(s => s.Contains("Alice")), Arg.Any()); await h.Service.StopAsync(default); } @@ -114,7 +114,7 @@ await h.Bus.PublishAsync(new PlayerStateChangedEvent( // The relay threw, causing the loop to fault and complete (LogRelayLoopFaulted). StopAsync joins the // faulted task cleanly — no rethrow. This is crash-isolation, not per-event resilience. await h.Sender.Received().SendAsync( - 10UL, Arg.Any(), Arg.Is(s => s!.Contains("Bob")), Arg.Any()); + 10UL, Arg.Any(), Arg.Is(s => s.Contains("Bob")), Arg.Any()); await h.Service.StopAsync(default); } diff --git a/tests/RustPlusBot.Features.Players.Tests/PlayerEventRelayTests.cs b/tests/RustPlusBot.Features.Players.Tests/PlayerEventRelayTests.cs index d68a91f..f46a8b4 100644 --- a/tests/RustPlusBot.Features.Players.Tests/PlayerEventRelayTests.cs +++ b/tests/RustPlusBot.Features.Players.Tests/PlayerEventRelayTests.cs @@ -54,7 +54,7 @@ await relay.RelayAsync( Evt(new PlayerTransition(PlayerTransitionKind.Connect, 1, "Bob", null)), CancellationToken.None); await _sender.Received(1).SendAsync( - Arg.Any(), Arg.Any(), Arg.Is(s => s!.Contains("Bob")), Arg.Any()); + Arg.Any(), Arg.Any(), Arg.Is(s => s.Contains("Bob")), Arg.Any()); } [Fact] diff --git a/tests/RustPlusBot.Features.StorageMonitors.Tests/StorageMonitorStateRelayTests.cs b/tests/RustPlusBot.Features.StorageMonitors.Tests/StorageMonitorStateRelayTests.cs index 3c1180f..c262472 100644 --- a/tests/RustPlusBot.Features.StorageMonitors.Tests/StorageMonitorStateRelayTests.cs +++ b/tests/RustPlusBot.Features.StorageMonitors.Tests/StorageMonitorStateRelayTests.cs @@ -222,7 +222,7 @@ await h.Relay.HandleReachabilityChangedAsync( // A device that became reachable must show its live contents, not the unreachable banner // (a null-contents render here would also disable the Refresh/Rename buttons). await h.Poster.Received(1).EnsureAsync(555UL, 900UL, - Arg.Is(e => e!.Description.Contains("Item100")), + Arg.Is(e => e.Description.Contains("Item100")), Arg.Any(), Arg.Any()); } diff --git a/tests/RustPlusBot.Features.Wipes.Tests/WipeAnnouncerTests.cs b/tests/RustPlusBot.Features.Wipes.Tests/WipeAnnouncerTests.cs index 10bf8d6..0394e4c 100644 --- a/tests/RustPlusBot.Features.Wipes.Tests/WipeAnnouncerTests.cs +++ b/tests/RustPlusBot.Features.Wipes.Tests/WipeAnnouncerTests.cs @@ -65,7 +65,7 @@ public async Task Posts_embed_without_ping_by_default() await h.Poster.Received(1).PostAsync( 777UL, null, - Arg.Is(e => e!.Title == "🧹 Server wiped"), + Arg.Is(e => e.Title == "🧹 Server wiped"), Arg.Any()); } @@ -93,7 +93,7 @@ public async Task Renders_with_guild_culture() await h.Poster.Received(1).PostAsync( 777UL, null, - Arg.Is(e => e!.Title == "🧹 Serveur wipé"), + Arg.Is(e => e.Title == "🧹 Serveur wipé"), Arg.Any()); }