Problem
The HTTP result-mapping code has approximately 24% line coverage in the October 5, 2026 .NET 10 coverage run. Most error-response paths are untested. These paths define the status codes and problem-details bodies that API clients rely on. You can view a test coverage report I generated here: index.html
Source: ResultExtensions.cs.
Proposed tests
Send HTTP requests to test endpoints backed by command services that produce each outcome:
| Command outcome |
Expected response |
| Success |
HTTP 200 with the expected result body |
| Domain validation failure |
HTTP 400 with domain validation details |
| Missing aggregate |
HTTP 404 with problem details |
| Optimistic concurrency conflict |
HTTP 409 with problem details |
| Unexpected failure |
HTTP 500 with problem details |
Cover both minimal-API and controller command mappings, since they use separate result-conversion paths. Assert the response content type and stable problem-details fields, including domain errors where applicable.
Acceptance criteria
Validation
Extend the existing ASP.NET Core test application and run the affected endpoint tests. Collect focused coverage for the HTTP result-mapping paths; do not rerun unrelated provider suites.
Problem
The HTTP result-mapping code has approximately 24% line coverage in the October 5, 2026 .NET 10 coverage run. Most error-response paths are untested. These paths define the status codes and problem-details bodies that API clients rely on. You can view a test coverage report I generated here: index.html
Source: ResultExtensions.cs.
Proposed tests
Send HTTP requests to test endpoints backed by command services that produce each outcome:
Cover both minimal-API and controller command mappings, since they use separate result-conversion paths. Assert the response content type and stable problem-details fields, including domain errors where applicable.
Acceptance criteria
ResultExtensions, external database, or Docker container are required.Validation
Extend the existing ASP.NET Core test application and run the affected endpoint tests. Collect focused coverage for the HTTP result-mapping paths; do not rerun unrelated provider suites.