public void DeleteMainCategoryNotFound()
        {
            var config     = new HttpConfiguration();
            var request    = new HttpRequestMessage(HttpMethod.Post, "http://localhost/api/user/44300");
            var route      = config.Routes.MapHttpRoute("Default", "api/{controller}/DeleteGoogleValue/{id}");
            var controller = new MainCategoryController
            {
                Request = request,
            };

            controller.Request.Properties[HttpPropertyKeys.HttpConfigurationKey] = config;
            Assert.AreEqual(controller.DeleteMainCategory("123").StatusCode, HttpStatusCode.NotFound);
        }
        public void DeleteMainCategorySuccess()
        {
            var config     = new HttpConfiguration();
            var request    = new HttpRequestMessage(HttpMethod.Post, "http://localhost/api/user/44300");
            var route      = config.Routes.MapHttpRoute("Default", "api/{controller}/DeleteGoogleValue/{id}");
            var controller = new MainCategoryController
            {
                Request = request,
            };

            controller.Request.Properties[HttpPropertyKeys.HttpConfigurationKey] = config;
            SwapDbConnection db   = new SwapDbConnection();
            main_category    test = db.main_category.Where(x => x.name == "unit test").FirstOrDefault();

            Assert.AreEqual(controller.DeleteMainCategory(test.main_id).StatusCode, HttpStatusCode.OK);
        }