Class DeprecatedVersionSunsetHeaderTests
- Namespace
- ProjectTemplate.Web.Tests
- Assembly
- ProjectTemplate.Web.Tests.dll
Covers the configurable Sunset header advertised for a deprecated API version.
public sealed class DeprecatedVersionSunsetHeaderTests
- Inheritance
-
DeprecatedVersionSunsetHeaderTests
- Inherited Members
Remarks
A sunset date commits to the callers of a specific deployment about when a version stops being served, so the template ships none. A hard-coded date is arbitrary while it is in the future and misleading once it passes, because a generated application would advertise a removal that already happened.
Methods
CurrentVersion_AdvertisesNoDeprecationOrSunsetEvenWhenConfigured()
Verifies that the current API version advertises neither deprecation nor a sunset date.
[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/DeprecatedVersionSunsetHeaderTests.cs", 68)]
public Task CurrentVersion_AdvertisesNoDeprecationOrSunsetEvenWhenConfigured()
Returns
- Task
A task that represents the asynchronous test operation.
DeprecatedVersion_AdvertisesConfiguredSunsetDate()
Verifies that a configured sunset date is advertised in RFC 1123 form.
[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/DeprecatedVersionSunsetHeaderTests.cs", 42)]
public Task DeprecatedVersion_AdvertisesConfiguredSunsetDate()
Returns
- Task
A task that represents the asynchronous test operation.
DeprecatedVersion_OmitsSunsetHeaderWhenNoDateIsConfigured()
Verifies that no sunset date is advertised when the application has not configured one.
[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/DeprecatedVersionSunsetHeaderTests.cs", 23)]
public Task DeprecatedVersion_OmitsSunsetHeaderWhenNoDateIsConfigured()
Returns
- Task
A task that represents the asynchronous test operation.
OptionsDefaultLeavesSunsetUnset()
Verifies that the shipped default leaves the sunset date unset.
[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/DeprecatedVersionSunsetHeaderTests.cs", 89)]
public void OptionsDefaultLeavesSunsetUnset()