I have a httppost web api method. I need to pass the token as the authorization header and collect the response.
I am using web-api 2. My post method returns IHttpActionResult ok (model).
I tested web-api using the POSTMAN rest client, which works.
I am stuck at a point where I cannot write UNIT-TEST to test my API.
Also, can I create a Unit test project and a web-api project in the same solution? I tried to configure the Unit test project and the web-api project as startup projects. But the Unit test project is just a library, so it wonβt work.
Can someone please guide me through this?
user3825003
source share