using ZB.MOM.WW.MxGateway.Server.Diagnostics;

namespace ZB.MOM.WW.MxGateway.Tests.Diagnostics;

public sealed class GatewayLogRedactorSeamTests
{
    [Fact]
    public void Redact_MasksApiKeyInClientIdentity()
    {
        GatewayLogRedactorSeam redactor = new();
        Dictionary<string, object?> props = new() { ["ClientIdentity"] = "Bearer mxgw_operator01_super-secret" };
        redactor.Redact(props);
        Assert.Equal("Bearer mxgw_operator01_[redacted]", props["ClientIdentity"]);
    }
}
