Is it possible to do "in memory" hosting with ASP.NET MVC applications, similar to Web API?

asp.net, asp.net-mvc, asp.net-mvc-4, c#

Solution

You might be interested in MvcIntegrationTestFramework. It is not the freshest one but I works. Here is self-explaining example from their page:

AppHost.Simulate("MyMvcApp").Start(browsingSession =>
{
    var loginResult = browsingSession.Post("Users/Login/", 
                                           new { UserName = "aaa", Password = "bbb" });
    Assert.That(loginResult.Response.StatusCode, Is.EqualTo(200));

    var result = browsingSession.Post("Money/Create/", 
                                      new { Amount = "1,000,000" });
    Assert.That(result.Response.StatusCode, Is.EqualTo(200));
});

Problem

I am writing an ASP.net MVC 4 application, and I am thinking about using "in memory" hosting to write integration tests for my custom action filters. There are a few examples on the web on how to do this with Web API (eg http://www.strathweb.com/2012/06/asp-net-web-api-integration-testing-with-in-memory-hosting/) but I haven't seen any example with MVC. Is it possible to do "in memory" hosting with MVC applications? If so does anyone have any examples or could they point me to any articles that do this?

Original source