using Heimdall.Application.DTOs; using Heimdall.Application.Events.Notifications; using Heimdall.Application.Services; using Heimdall.Domain.Enums; using NSubstitute; namespace Heimdall.Application.Tests.Handlers.Events; public class ManualSnapshotNotificationTests { [Fact] public async Task ManualSnapshot_BroadcastsEventWithoutDetectionAlert() { var broadcast = Substitute.For(); var access = Substitute.For(); var notifications = Substitute.For(); var handler = new EventCreatedNotificationHandler(broadcast, access, notifications); var cameraEvent = new CameraEventResponse(Guid.NewGuid(), Guid.NewGuid(), Guid.NewGuid(), null, null, EventType.ManualSnapshot, 1, "manual", null, null, null, DateTime.UtcNow, DateTime.UtcNow); await handler.Handle(new EventCreatedNotification(cameraEvent), CancellationToken.None); await broadcast.Received(1).NotifyEventCreated(cameraEvent, Arg.Any()); await access.DidNotReceiveWithAnyArgs().GetUserIdsWithCameraAccessAsync(default); } }