using System.Collections.Generic;

namespace ZB.MOM.WW.MxGateway.Worker.Tests.Bootstrap;

/// <summary>
/// Captures a log entry for testing.
/// </summary>
internal sealed class MemoryWorkerLogEntry
{
    /// <summary>
    /// Initializes a log entry with level, event name, and fields.
    /// </summary>
    /// <param name="level">Log level (e.g., Debug, Info, Warning, Error).</param>
    /// <param name="eventName">Event name or category.</param>
    /// <param name="fields">Dictionary of log fields.</param>
    public MemoryWorkerLogEntry(
        string level,
        string eventName,
        IReadOnlyDictionary<string, object?> fields)
    {
        Level = level;
        EventName = eventName;
        Fields = fields;
    }

    /// <summary>
    /// Gets the log level.
    /// </summary>
    public string Level { get; }

    /// <summary>
    /// Gets the event name.
    /// </summary>
    public string EventName { get; }

    /// <summary>
    /// Gets the log entry fields.
    /// </summary>
    public IReadOnlyDictionary<string, object?> Fields { get; }
}
