28 writes to RedactionFormat
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (6)
Logging\AcceptanceTests.Mvc.cs (1)
39.AddFakeRedaction(x => x.RedactionFormat = RedactedFormat)
Logging\AcceptanceTests.Routing.cs (1)
30.AddFakeRedaction(x => x.RedactionFormat = RedactedFormat)
Logging\HeaderReaderTests.cs (1)
48new FakeRedactorOptions { RedactionFormat = "<redacted:{0}>" }), Prefix);
Logging\RequestHeadersEnricherTests.cs (3)
93.Returns(FakeRedactor.Create(new FakeRedactorOptions { RedactionFormat = "redacted:{0}" })); 124.Returns(FakeRedactor.Create(new FakeRedactorOptions { RedactionFormat = "REDACTED:{0}" })); 275.Returns(FakeRedactor.Create(new FakeRedactorOptions { RedactionFormat = "redacted:{0}" }));
Microsoft.Extensions.Compliance.Testing.Tests (11)
FakeRedactorOptionsValidatorTests.cs (2)
16RedactionFormat = null! 37RedactionFormat = format
FakeRedactorTests.cs (2)
36Assert.Throws<ArgumentException>(() => FakeRedactor.Create(new FakeRedactorOptions { RedactionFormat = "{{{{{23123{}}" })); 44var redactor = FakeRedactor.Create(new FakeRedactorOptions { RedactionFormat = RedactedConstOutput });
RedactionFakesAcceptanceTests.cs (7)
100.AddRedaction(x => x.SetFakeRedactor(x => { x.RedactionFormat = "xxx{0}xxx"; }, dc)) 120.AddRedaction(builder => builder.SetFakeRedactor(options => { options.RedactionFormat = "xxx{0}xxx"; }, dc)) 140.AddRedaction(builder => builder.SetFakeRedactor(options => { options.RedactionFormat = "xxx{0}xxx"; }, dc)) 159.AddRedaction(builder => builder.SetFakeRedactor(options => { options.RedactionFormat = "xxx{0}xxx"; }, dc)) 179.AddRedaction(builder => builder.SetFakeRedactor(options => { options.RedactionFormat = "xxx{0}xxx"; }, dc)) 201.AddFakeRedaction(x => x.RedactionFormat = redactionFormat) 233Assert.Throws<ArgumentNullException>(() => ((IRedactionBuilder)null!).SetFakeRedactor(x => x.RedactionFormat = "2", dc));
Microsoft.Extensions.Http.Diagnostics.Tests (5)
HttpHeadersRedactorTests.cs (1)
18var redactorProvider = new FakeRedactorProvider(new FakeRedactorOptions { RedactionFormat = "Redacted:{0}" });
Logging\AcceptanceTests.cs (3)
297.AddFakeRedaction(o => o.RedactionFormat = "REDACTED:{0}") 343.AddFakeRedaction(o => o.RedactionFormat = "<REDACTED:{0}>") 408.AddFakeRedaction(o => o.RedactionFormat = "REDACTED:{0}")
Logging\HttpRequestReaderTest.cs (1)
276using var serviceProvider = GetServiceProvider(headersReader, configureRedaction: x => x.RedactionFormat = Redacted);
Microsoft.Extensions.Telemetry.Tests (6)
Http\HttpParserTests.cs (1)
478new FakeRedactorOptions { RedactionFormat = "Redacted:{0}" });
Http\HttpRouteFormatterTests.cs (1)
498new FakeRedactorOptions { RedactionFormat = "Redacted:{0}" });
Logging\ExtendedLoggerTests.cs (2)
40RedactionFormat = "REDACTED<{0}>", 198RedactionFormat = "REDACTED<{0}>",
Logging\JustInTimeRedactorTests.cs (2)
32RedactionFormat = $"{ShortRedactorPrefix}<{{0}}>", 37RedactionFormat = $"{longRedactorPrefix}<{{0}}>",
7 references to RedactionFormat
Microsoft.Extensions.Compliance.Testing (4)
FakeRedactor.cs (1)
59_format = CompositeFormat.Parse(opt.Value.RedactionFormat);
FakeRedactorOptionsCustomValidator.cs (3)
20_ = string.Format(CultureInfo.InvariantCulture, options.RedactionFormat, "Test"); 25$"{nameof(options.RedactionFormat)} must be a valid .NET format string taking 0 or 1 arguments: {ex.Message}", 26nameof(options.RedactionFormat));
Microsoft.Extensions.Compliance.Testing.Tests (3)
FakeRedactorOptionsValidatorTests.cs (2)
23Assert.Contains(nameof(FakeRedactorOptions.RedactionFormat), validationResult.FailureMessage); 43Assert.Contains(nameof(options.RedactionFormat), validationResult.FailureMessage);
Setup.cs (1)
18{ $"{nameof(FakeRedactorOptions)}:{nameof(options.RedactionFormat)}", "What is it? O_o '{0}'" },