using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using PolyTrader.Core.Notifications;

namespace PolyTrader.Tests.Fakes
{
    /// <summary>
    /// In-Memory-Stub des Benachrichtigungsausgangs – Tests können asserten, WAS gemeldet wurde
    /// (zuvor bekamen die Tests eine echte ThreemaService-Instanz, die nichts prüfbar machte).
    /// </summary>
    public sealed class FakeNotificationSink : INotificationSink
    {
        public List<(string Message, NotificationSeverity Severity)> Sent { get; } = new();

        public Task SendAsync(string message, NotificationSeverity severity = NotificationSeverity.Info,
                              CancellationToken ct = default)
        {
            Sent.Add((message, severity));
            return Task.CompletedTask;
        }
    }
}
