using ZB.MOM.WW.ScadaBridge.Commons.Interfaces.Services;

namespace ZB.MOM.WW.ScadaBridge.AuditLog.Tests.TestSupport;

/// <summary>
/// Test fake for <see cref="INodeIdentityProvider"/>. Returns the configured
/// <see cref="NodeName"/> verbatim — including <c>null</c> — so tests can
/// exercise both the "stamped" and "unconfigured" branches of the SourceNode
/// stamping logic in <see cref="ZB.MOM.WW.ScadaBridge.AuditLog.Site.SqliteAuditWriter"/>
/// and <see cref="ZB.MOM.WW.ScadaBridge.AuditLog.Central.CentralAuditWriter"/>.
/// </summary>
internal sealed class FakeNodeIdentityProvider : INodeIdentityProvider
{
    public string? NodeName { get; }

    public FakeNodeIdentityProvider(string? nodeName = null)
    {
        NodeName = nodeName;
    }
}
