In Process Http Server for Integration Test Faking with Owin, Katana, and WebAPI

added by Paul Wheeler
6/24/2014 12:56:29 PM


For isolated integration tests that require some HTTP endpoint we can create an HTTP endpoint from within our test code that doesn’t require a separate web project. This means that when tests run they have no external dependency in the sense of a “real” website being hosted somewhere – even if that somewhere is on the local dev machine. Another advantage of the approach outlined below is that because it’s all in-process it’s also faster than actually going through the network stack.