public void PackagesControllerProcessChecked() { var config = new HttpConfiguration(); var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/be/api"); var route = config.Routes.MapHttpRoute("DefaultApi", "api/{controller}/{id}"); var routeData = new HttpRouteData(route, new HttpRouteValueDictionary { { "id", "install" } }); _ctrl.ControllerContext = new HttpControllerContext(config, routeData, request); _ctrl.Request = request; _ctrl.Request.Properties[HttpPropertyKeys.HttpConfigurationKey] = config; var items = new List<Package>(); items.Add(new Package() { Id = "test" }); var result = _ctrl.ProcessChecked(items); Assert.IsTrue(result.IsSuccessStatusCode); }