Class RequestLoggingPrivacyTests
- Namespace
- ProjectTemplate.Web.Tests
- Assembly
- ProjectTemplate.Web.Tests.dll
Verifies that diagnostic log entries written outside the request-logging middleware honor the request-logging remote IP address privacy option.
public sealed class RequestLoggingPrivacyTests
- Inheritance
-
RequestLoggingPrivacyTests
- Inherited Members
Methods
GetLoggableRemoteIpAddress_ReturnsAddress_WhenIncludeRemoteIpAddressIsEnabled()
Verifies that the remote IP address is returned when request logging explicitly opts in.
[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/RequestLoggingPrivacyTests.cs", 33)]
public void GetLoggableRemoteIpAddress_ReturnsAddress_WhenIncludeRemoteIpAddressIsEnabled()
GetLoggableRemoteIpAddress_ReturnsNull_ByDefault()
Verifies that the remote IP address is withheld when request logging uses its default options.
[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/RequestLoggingPrivacyTests.cs", 20)]
public void GetLoggableRemoteIpAddress_ReturnsNull_ByDefault()
GetLoggableRemoteIpAddress_ReturnsNull_WhenOptionsAreNotRegistered()
Verifies that the privacy-preserving default applies when request logging options are not registered.
[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/RequestLoggingPrivacyTests.cs", 47)]
public void GetLoggableRemoteIpAddress_ReturnsNull_WhenOptionsAreNotRegistered()
GetLoggableRemoteIpAddress_ReturnsNull_WhenRequestServicesAreUnavailable()
Verifies that the privacy-preserving default applies when the request has no service provider.
[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/RequestLoggingPrivacyTests.cs", 60)]
public void GetLoggableRemoteIpAddress_ReturnsNull_WhenRequestServicesAreUnavailable()