public void non_admin_product_delete_product()
        {
            //Arrange
            var controller = new ProductController(new ProductBLL(new ProductDALStub()));

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

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

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

            //Assert
            Assert.IsTrue(success);
        }