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

            controller.Request.Properties[HttpPropertyKeys.HttpConfigurationKey] = config;
            Assert.AreEqual(controller.ChangeActiveMainCategory("123", true).StatusCode, HttpStatusCode.NotFound);
        }
        public void ChangeActiveMainCategorySuccess()
        {
            var config     = new HttpConfiguration();
            var request    = new HttpRequestMessage(HttpMethod.Post, "http://localhost/api/user/44300");
            var route      = config.Routes.MapHttpRoute("Default", "api/{controller}/AddMainCategory/");
            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.ChangeActiveMainCategory(test.main_id, true).StatusCode, HttpStatusCode.OK);
        }