public void GetEditProductCategoryTest()
 {
     _ShopListPresentationModel.GetCurrentProduce("1", 0, "主機板");
     _ShopListPresentationModel.AddItemToCart();
     _productManagement.EditProductCategory(_productManagement.AllProducts[0], "cagegory");
     Assert.AreEqual(_ShopListPresentationModel.GetEditProductCategory(), "cagegory");
 }
Exemplo n.º 2
0
 public void EditProductCategoryTest()
 {
     _productManagement._writeNewData += EventHandler;
     _productManagement.EditProductCategory(_productManagement.AllProducts[0], "category");
     Assert.AreEqual(_productManagement.AllProducts[0].ProductCategory, "category");
     _productManagement._writeNewData += EventHandler;
 }
Exemplo n.º 3
0
        // 修改商品
        public void ModifyProduct(int rowIndex, String[] content)
        {
            List <Product> products = _productManagement.AllProducts;

            content[PATH_INDEX] = this.CopyFileToResources(content[PATH_INDEX]);
            _productManagement.EditProductName(products[rowIndex], content[NAME_INDEX]);
            _productManagement.EditProductPrice(products[rowIndex], content[PRICE_INDEX]);
            _productManagement.EditProductCategory(products[rowIndex], content[CATEGORY_INDEX]);
            _productManagement.EditProductPicturePath(products[rowIndex], content[PATH_INDEX]);
            _productManagement.EditProductDetail(products[rowIndex], content[DETAIL_INDEX]);
        }
Exemplo n.º 4
0
 public void GetCategoryTest()
 {
     _productManagement.EditProductCategory(_productManagement.AllProducts[0], "category");
     Assert.AreEqual(_inventorySystemPresentationModel.GetCategory(), "category");
 }