diff --git a/EnvelopeGenerator.Tests.Application/HistoryTests.cs b/EnvelopeGenerator.Tests.Application/HistoryTests.cs index 7209cac0..c73e0d5a 100644 --- a/EnvelopeGenerator.Tests.Application/HistoryTests.cs +++ b/EnvelopeGenerator.Tests.Application/HistoryTests.cs @@ -21,6 +21,10 @@ public class HistoryTests private readonly List<(int Id, string EmailAddress)> _receivers = new(); + public (int Id, string EmailAddress) Receiver => _receivers.Count == 0 + ? throw new InvalidOperationException("Receiver list is empty.") + : _receivers[Random.Shared.Next(_receivers.Count)]; + [SetUp] public async Task Setup() {