TestBase-Mvc (nuget): *TestBase* gets you off to a flying start when unit testing projects with dependencies. TestBase-Mvc adds a rich extensible set of fluent assertions for verifying Mvc ActionResults and for easy setup of ControllerContext and HttpContext for both Mvc and WebApi TestBase.Shoulds ------------------- Chainable fluent assertions get you to the point concisely ControllerUnderTest.Action()   .ShouldbeViewResult()   .ShouldHaveModel<TModel>()   .ShouldEqualByValue(expected) ControllerUnderTest.Action()   .ShouldBeRedirectToRouteResult()   .ShouldHaveRouteValue("expectedKey", [Optional] "expectedValue");  ShouldHaveViewDataContaining(), ShouldBeJsonResult() etc.  TestBase ---------- Controller extensions to fake the http request & context. By injecting the RegisterRoutes method of your MvcApplication, you can use and test Controller.Url with your application's configured routes.  ControllerUnderTest   .WithHttpContextAndRoutes(     [Optional] Action<RouteCollection> mvcApplicationRoutesRegistration,      [optional] string requestUrl,     [Optional] string query = "",     [Optional] string appVirtualPath = "/",     [Optional] HttpApplication applicationInstance)  ApiControllerUnderTest.WithWebApiHttpContext<T>(     HttpMethod httpMethod,      [Optional] string requestUri,     [Optional] string routeTemplate)
Keywords: nunit|tdd|fluent|assertions|mock|mvc