Class RequestLoggingExtensionsBranchGapTests
- Namespace
- ProjectTemplate.Web.Tests
- Assembly
- ProjectTemplate.Web.Tests.dll
public sealed class RequestLoggingExtensionsBranchGapTests
- Inheritance
-
RequestLoggingExtensionsBranchGapTests
- Inherited Members
-
Methods
[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/RequestLoggingExtensionsBranchGapTests.cs", 13)]
public void AddApplicationRequestLogging_BlankCorrelationHeaderName_FailsOptionsValidation()
AddApplicationRequestLogging_BlankExcludedPathPrefix_IsIgnored(string)
[Theory("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/RequestLoggingExtensionsBranchGapTests.cs", 62)]
[InlineData(new object?[] { "" })]
[InlineData(new object?[] { " " })]
public void AddApplicationRequestLogging_BlankExcludedPathPrefix_IsIgnored(string excludedPrefix)
Parameters
excludedPrefix string
AddApplicationRequestLogging_InvalidExcludedPathPrefix_FailsOptionsValidation(string)
[Theory("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/RequestLoggingExtensionsBranchGapTests.cs", 35)]
[InlineData(new object?[] { "health" })]
[InlineData(new object?[] { "metrics/" })]
public void AddApplicationRequestLogging_InvalidExcludedPathPrefix_FailsOptionsValidation(string excludedPrefix)
Parameters
excludedPrefix string
AddApplicationRequestLogging_ValidExcludedPathPrefixes_BindsOptions()
[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/RequestLoggingExtensionsBranchGapTests.cs", 86)]
public void AddApplicationRequestLogging_ValidExcludedPathPrefixes_BindsOptions()
[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/RequestLoggingExtensionsBranchGapTests.cs", 132)]
public void GetCorrelationId_HeaderLongerThanMaximum_TruncatesToMaximumLength()
[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/RequestLoggingExtensionsBranchGapTests.cs", 118)]
public void GetCorrelationId_HeaderWithWhitespace_ReturnsTrimmedHeaderValue()
[Theory("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/RequestLoggingExtensionsBranchGapTests.cs", 147)]
[InlineData(null)]
[InlineData(new object?[] { "" })]
[InlineData(new object?[] { " " })]
public void GetCorrelationId_MissingOrBlankHeader_ReturnsTraceIdentifier(string? headerValue)
Parameters
headerValue string
[Theory("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/RequestLoggingExtensionsBranchGapTests.cs", 168)]
[InlineData(new object?[] { "/HEALTH/ready", true })]
[InlineData(new object?[] { "/metrics/runtime", true })]
[InlineData(new object?[] { "/api/status", false })]
[InlineData(new object?[] { "", false })]
public void IsExcludedPath_ReturnsExpectedMatchForConfiguredPrefixes(string requestPath, bool expectedResult)
Parameters
requestPath string
expectedResult bool