public void CategoryIndexTest()
 {
     ProductController target = new ProductController(new TestCategoryRepository(),
         new TestProductRepository(), new TestOrderRepository());
     ViewResult actual;
     actual = target.CategoryIndex() as ViewResult;
     Assert.IsNotNull(actual.ViewData.Model);
 }
 public void Edit01Test()
 {
     ProductController target = new ProductController(new TestCategoryRepository(),
         new TestProductRepository(), new TestOrderRepository());
     Nullable<int> number = null;
     int productID = 0;
     string txID = string.Empty;
     ViewResult actual;
     actual = target.Edit(number, productID, txID) as ViewResult;
     Assert.IsNotNull(actual.ViewData.ModelState["number"]);
 }
 public void ProductIndex02Test()
 {
     ProductController target = new ProductController(new TestCategoryRepository(),
         new TestProductRepository(), new TestOrderRepository());
     int categoryId = -1;
     RedirectToRouteResult actual;
     actual = target.ProductIndex(categoryId) as RedirectToRouteResult;
     Assert.AreEqual("Sorry", actual.RouteValues["action"]);
     Assert.AreEqual("Result", actual.RouteValues["controller"]);
 }
 public void Edit12Test()
 {
     ProductController target = new ProductController(new TestCategoryRepository(),
         new TestProductRepository(), new TestOrderRepository());
     int productId = -1;
     ViewResult actual;
     actual = target.Edit(productId) as ViewResult;
     Assert.IsNotNull(actual);
 }