public void non_admin_category_delete_producer_httppost()
        {
            //Arrange
            var controller = new CategoryController(new CategoryBLL(new CategoryDALStub()));

            //Act
            var result = (RedirectToRouteResult)controller.DeleteProducer(0);

            //Assert
            Assert.AreEqual("LogIn", result.RouteValues["Action"]);
            Assert.AreEqual("Main", result.RouteValues["Controller"]);
        }
        public void category_delete_producer_httppost_child()
        {
            //Arrange
            TestControllerBuilder builder = new TestControllerBuilder();
            var controller = new CategoryController(new CategoryBLL(new CategoryDALStub()));
            builder.InitializeController(controller);
            builder.HttpContext.Session["loggedInUser"] = new Customer() { id = 1, admin = true };

            //Act
            var action = (JsonResult)controller.DeleteProducer(4);
            var success = (bool)(new PrivateObject(action.Data, "success")).Target;

            //Assert
            Assert.IsFalse(success);
        }