public void GetEditProductPriceTest()
 {
     _ShopListPresentationModel.GetCurrentProduce("1", 0, "主機板");
     _ShopListPresentationModel.AddItemToCart();
     _productManagement.EditProductPrice(_productManagement.AllProducts[0], "999");
     Assert.AreEqual(_ShopListPresentationModel.GetEditProductPrice(), "999");
 }
Example #2
0
 public void EditProductPriceTest()
 {
     _productManagement._writeNewData += EventHandler;
     _productManagement.EditProductPrice(_productManagement.AllProducts[0], "123");
     Assert.AreEqual(_productManagement.AllProducts[0].ProductPrice, "123");
     _productManagement._writeNewData += EventHandler;
 }
Example #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]);
        }
Example #4
0
 public void GetPriceTest()
 {
     _productManagement.EditProductPrice(_productManagement.AllProducts[0], "999");
     Assert.AreEqual(_inventorySystemPresentationModel.GetPrice(), "999");
 }