27 references to SensitiveRecordExtensions
Microsoft.Gen.Logging.Generated.Tests (27)
SensitiveRecordTests.cs (27)
17SensitiveRecordExtensions.LogInTemplate(logger, new());
20Assert.DoesNotContain(SensitiveRecordExtensions.Sensitive, logRecord.Message);
22Assert.All(logRecord.StructuredState, x => Assert.DoesNotContain(SensitiveRecordExtensions.Sensitive, x.Value));
29SensitiveRecordExtensions.LogFullyStructured(logger, new());
32Assert.DoesNotContain(SensitiveRecordExtensions.Sensitive, logRecord.Message);
34Assert.All(logRecord.StructuredState, x => Assert.DoesNotContain(SensitiveRecordExtensions.Sensitive, x.Value));
41var dataToLog = new SensitiveRecordExtensions.RecordWithSensitiveMembers(SensitiveRecordExtensions.Sensitive, SensitiveRecordExtensions.Sensitive)
43PropGetSet = SensitiveRecordExtensions.Sensitive
46SensitiveRecordExtensions.LogPropertiesWithTemplate(logger, dataToLog);
49Assert.DoesNotContain(SensitiveRecordExtensions.Sensitive, logRecord.Message);
51Assert.All(logRecord.StructuredState, x => Assert.DoesNotContain(SensitiveRecordExtensions.Sensitive, x.Value));
58var dataToLog = new SensitiveRecordExtensions.RecordWithSensitiveMembers(SensitiveRecordExtensions.Sensitive, SensitiveRecordExtensions.Sensitive)
60PropGetSet = SensitiveRecordExtensions.Sensitive
63SensitiveRecordExtensions.LogPropertiesFullyStructured(logger, dataToLog);
66Assert.DoesNotContain(SensitiveRecordExtensions.Sensitive, logRecord.Message);
68Assert.All(logRecord.StructuredState, x => Assert.DoesNotContain(SensitiveRecordExtensions.Sensitive, x.Value));
75var dataToLog = new SensitiveRecordExtensions.RecordWithSensitiveMembers(SensitiveRecordExtensions.Sensitive, SensitiveRecordExtensions.Sensitive)
77PropGetSet = SensitiveRecordExtensions.Sensitive
80SensitiveRecordExtensions.LogInTemplateWithAnnotation(logger, dataToLog);
83Assert.DoesNotContain(SensitiveRecordExtensions.Sensitive, logRecord.Message);
85Assert.All(logRecord.StructuredState, x => Assert.DoesNotContain(SensitiveRecordExtensions.Sensitive, x.Value));