Skip to content

niesmo/ProblemDetailsUnitTestingIssue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProblemDetailsUnitTestingIssue

Running the project

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

Running the test

dotnet test

Exception Detail

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages