Class AdvertisedBehaviorTestController
- Namespace
- ProjectTemplate.Web.Tests.TestControllers
- Assembly
- ProjectTemplate.Web.Tests.dll
Provides test endpoints used to verify v1.0 advertised runtime behavior.
[ApiController]
[Route("test/advertised-behavior")]
public sealed class AdvertisedBehaviorTestController : ControllerBase
- Inheritance
-
AdvertisedBehaviorTestController
- Inherited Members
Methods
ProblemDetailsException()
Throws an argument exception to verify API-style Problem Details handling.
[HttpGet("problem-details")]
public IActionResult ProblemDetailsException()
Returns
- IActionResult
Never returns; the action always throws.
Remarks
This must stay an instance method. MVC does not discover static methods as actions, so declaring it static made the route unreachable and every request to it returned 404 instead of exercising the error pipeline.
Exceptions
- ArgumentException
Always thrown for test coverage.
RequestInfo()
Returns request information after middleware has processed forwarded headers.
[HttpGet("request-info")]
public IActionResult RequestInfo()
Returns
- IActionResult
Request scheme, host, and remote IP information.