Bootstrap StructureMap.WebApi2 from OWIN Native Host WepAPI2

I have a WebAPI project that I myself host in an integrated test suite project to have tests install and break a WebAPI application in the process by 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 great except the WebAPI project is using StructureMap.MVC5 and I can't figure out how to load it?

This does not work:

    [TestFixtureSetUp]
    public void FixtureSetUp()
    {
        StructuremapMvc.Start();
        WebApp.Start<Startup>(BaseAddress);
    }

      

+3


source to share





All Articles