From 1371eefb705a6e8e42432151daefc402d30640ab Mon Sep 17 00:00:00 2001 From: Arnaud Dartois Date: Sun, 25 Oct 2026 21:13:10 +0100 Subject: [PATCH] test(notifications): guard scheduled job casts --- .../Notifications/NotificationDeliveryOutboxTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Heimdall.IntegrationTests/Notifications/NotificationDeliveryOutboxTests.cs b/tests/Heimdall.IntegrationTests/Notifications/NotificationDeliveryOutboxTests.cs index 3c4b643..c728fe0 100644 --- a/tests/Heimdall.IntegrationTests/Notifications/NotificationDeliveryOutboxTests.cs +++ b/tests/Heimdall.IntegrationTests/Notifications/NotificationDeliveryOutboxTests.cs @@ -132,14 +132,14 @@ public sealed class NotificationDeliveryOutboxTests(PostgreSqlContainerFixture p var scheduled = backgroundJobs.ReceivedCalls() .Where(call => call.GetMethodInfo().Name == nameof(IBackgroundJobClient.Create)) .Select(call => call.GetArguments()) - .Select(args => (Job)args[0]) + .Select(args => (Job)args[0]!) .ToArray(); scheduled.Length.ShouldBe(3); scheduled.Select(job => (Guid)job.Args[0]!).ShouldBe([dueEmailId, dueNtfyId, expiredLeaseId]); var queues = backgroundJobs.ReceivedCalls() .Where(call => call.GetMethodInfo().Name == nameof(IBackgroundJobClient.Create)) - .Select(call => (EnqueuedState)call.GetArguments()[1]) + .Select(call => (EnqueuedState)call.GetArguments()[1]!) .Select(state => state.Queue) .ToArray(); queues.ShouldBe(["email", "ntfy", "email"]);