How does the In-Memory HttpServer know which WebAPI project to host?

前端 未结 3 887
一生所求
一生所求 2020-12-10 12:55

I want to run tests against WebAPI project using a popular in-memory hosting strategy.

My tests reside in a separate project.

Here\'s the start of my test

3条回答
  •  囚心锁ツ
    2020-12-10 13:25

    Web Api should find all your controllers that inherit from ApiController. As long as all your controllers are in the same solution it should work just fine. I have a very similar setup that runs tests using the in-memory httpserver against controllers in another project. This gives me the ability to do very fast "integration" tests in my unit test project.

提交回复
热议问题