using ZB.MOM.WW.MxGateway.Server.Diagnostics; namespace ZB.MOM.WW.MxGateway.Tests.Diagnostics; public sealed class GatewayLogRedactorSeamTests { /// Redacting a log property containing a bearer API key masks the secret while preserving the key id prefix. [Fact] public void Redact_MasksApiKeyInClientIdentity() { GatewayLogRedactorSeam redactor = new(); Dictionary props = new() { ["ClientIdentity"] = "Bearer mxgw_operator01_super-secret" }; redactor.Redact(props); Assert.Equal("Bearer mxgw_operator01_[redacted]", props["ClientIdentity"]); } }