3

I have a WebAPI project that I am self hosting from an integration test suite project so that the tests will setup and tear down the WebAPI app in process, following these instructions

http://www.asp.net/web-api/overview/hosting-aspnet-web-api/use-owin-to-self-host-web-api

https://ovaismehboob.wordpress.com/2013/10/28/loading-web-api-controllers-from-other-libraries-when-self-hosting-web-api/

Which works fine, except that WebAPI project uses StructureMap.MVC5 and I can't figure out how to bootstrap it?

This DOES NOT work:

    [TestFixtureSetUp]
    public void FixtureSetUp()
    {
        StructuremapMvc.Start();
        WebApp.Start<Startup>(BaseAddress);
    }
Myles McDonnell
  • 12,943
  • 17
  • 66
  • 116

0 Answers0