dotnet run --project ./WebApi/WebApi.csproj
Once the solution is running, open a browser to go to http://localhost:5000/weatherforecast
To see the ProblemDetail response in action, go to http://localhost:5000/weatherforecast?numberOfDays=-1
dotnet test
Message:
System.NullReferenceException : Object reference not set to an instance of an object.
Stack Trace:
ControllerBase.Problem(String detail, String instance, Nullable`1 statusCode, String title, String type)
WeatherForecastController.GetWeatherForecast(Int32 numberOfDays) line 35
WeatherForecastUnitTests.WeatherForecastHandlesExceptions() line 35