Integration testing in .net core api 3.1

233 Views Asked by At

I am trying to implement integration testing for each API that i have developed in .Net core 3.1 and have followed this link to create test cases for it.

Please find the below test class that i have created for my API.

enter image description here

But while executing i am getting error in this line _server = new TestServer(new WebHostBuilder() .UseStartup<Startup>()); which is as below :

Error

Am i missing anything here ?

1

There are 1 best solutions below

0
On BEST ANSWER

This is not an error. its actually an issue in visual studio. please refer https://stackoverflow.com/a/52387048/9524580 will sort out the issue