Class HstsTests
- Namespace
- ProjectTemplate.Web.Tests
- Assembly
- ProjectTemplate.Web.Tests.dll
Verifies HTTP Strict Transport Security registration.
public sealed class HstsTests
- Inheritance
-
HstsTests
- Inherited Members
Methods
ApplicationPipeline_NonDevelopmentHttpsRequest_EmitsStrictTransportSecurity()
Verifies that the application pipeline emits Strict-Transport-Security outside Development.
[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/HstsTests.cs", 24)]
public Task ApplicationPipeline_NonDevelopmentHttpsRequest_EmitsStrictTransportSecurity()
Returns
- Task
A task that represents the asynchronous test operation.
UseApplicationHsts_Development_DoesNotEmitStrictTransportSecurity()
Verifies that UseApplicationHsts(WebApplication) does not emit the header in Development.
[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/HstsTests.cs", 62)]
public Task UseApplicationHsts_Development_DoesNotEmitStrictTransportSecurity()
Returns
- Task
A task that represents the asynchronous test operation.
UseApplicationHsts_Production_EmitsStrictTransportSecurity()
Verifies that UseApplicationHsts(WebApplication) emits the header outside Development.
[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/HstsTests.cs", 50)]
public Task UseApplicationHsts_Production_EmitsStrictTransportSecurity()
Returns
- Task
A task that represents the asynchronous test operation.