15 references to TestHttpLogEnricher
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (15)
Logging\AcceptanceTests.cs (14)
402
x.AddHttpLogEnricher<
TestHttpLogEnricher
>();
421
Assert.Single(state, x => x.Key ==
TestHttpLogEnricher
.Key1 && x.Value ==
TestHttpLogEnricher
.Value1);
422
Assert.Single(state, x => x.Key ==
TestHttpLogEnricher
.Key2 && x.Value ==
TestHttpLogEnricher
.Value2.ToString(CultureInfo.CurrentCulture));
474
x.AddHttpLogEnricher<
TestHttpLogEnricher
>();
495
Assert.DoesNotContain(firstState, x => x.Key ==
TestHttpLogEnricher
.Key1 && x.Value ==
TestHttpLogEnricher
.Value1);
496
Assert.DoesNotContain(firstState, x => x.Key ==
TestHttpLogEnricher
.Key2 && x.Value ==
TestHttpLogEnricher
.Value2.ToString(CultureInfo.CurrentCulture));
499
Assert.Single(secondState, x => x.Key ==
TestHttpLogEnricher
.Key1 && x.Value ==
TestHttpLogEnricher
.Value1);
500
Assert.Single(secondState, x => x.Key ==
TestHttpLogEnricher
.Key2 && x.Value ==
TestHttpLogEnricher
.Value2.ToString(CultureInfo.CurrentCulture));
Logging\HttpLoggingServiceExtensionsTests.cs (1)
25
Assert.Throws<ArgumentNullException>(static () => HttpLoggingServiceCollectionExtensions.AddHttpLogEnricher<
TestHttpLogEnricher
>(null!));