public void BlogControllerProcessChecked() { 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", "delete" } }); _ctrl.ControllerContext = new HttpControllerContext(config, routeData, request); _ctrl.Request = request; _ctrl.Request.Properties[HttpPropertyKeys.HttpConfigurationKey] = config; var items = new List <BlogEngine.Core.Data.Models.Blog>(); items.Add(new BlogEngine.Core.Data.Models.Blog() { IsChecked = true, Id = Guid.NewGuid() }); var result = _ctrl.ProcessChecked(items); Assert.AreEqual(HttpStatusCode.OK, result.StatusCode); }