15 references to TestHttpLogEnricher
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (15)
Logging\AcceptanceTests.cs (14)
488
x.AddHttpLogEnricher<
TestHttpLogEnricher
>();
507
Assert.Single(state, x => x.Key ==
TestHttpLogEnricher
.Key1 && x.Value ==
TestHttpLogEnricher
.Value1);
508
Assert.Single(state, x => x.Key ==
TestHttpLogEnricher
.Key2 && x.Value ==
TestHttpLogEnricher
.Value2.ToString(CultureInfo.InvariantCulture));
560
x.AddHttpLogEnricher<
TestHttpLogEnricher
>();
581
Assert.DoesNotContain(firstState, x => x.Key ==
TestHttpLogEnricher
.Key1 && x.Value ==
TestHttpLogEnricher
.Value1);
582
Assert.DoesNotContain(firstState, x => x.Key ==
TestHttpLogEnricher
.Key2 && x.Value ==
TestHttpLogEnricher
.Value2.ToString(CultureInfo.InvariantCulture));
585
Assert.Single(secondState, x => x.Key ==
TestHttpLogEnricher
.Key1 && x.Value ==
TestHttpLogEnricher
.Value1);
586
Assert.Single(secondState, x => x.Key ==
TestHttpLogEnricher
.Key2 && x.Value ==
TestHttpLogEnricher
.Value2.ToString(CultureInfo.InvariantCulture));
Logging\HttpLoggingServiceExtensionsTests.cs (1)
25
Assert.Throws<ArgumentNullException>(static () => HttpLoggingServiceCollectionExtensions.AddHttpLogEnricher<
TestHttpLogEnricher
>(null!));