public void IsEditItemInCartTest() { _ShopListPresentationModel.GetCurrentProduce("1", 0, "主機板"); _ShopListPresentationModel.AddItemToCart(); _productManagement.EditProductName(_productManagement.AllProducts[0], "name"); Assert.IsTrue(_ShopListPresentationModel.IsEditItemInCart()); _productManagement.EditProductName(_productManagement.AllProducts[1], "name"); Assert.IsFalse(_ShopListPresentationModel.IsEditItemInCart()); }
// 更新整個頁面 public void UpdateProductData() { this.ShowCurrentAndTotalPage(); // 顯示頁數 this.CleanDetail(); // 清空詳細資料 this.ShowItemPicture(); //顯示商品圖片 this.CheckChangePageButton(); // 換頁按鈕 if (_shopListPresentationModel.IsEditItemInCart()) // 修改已經加入購物車的商品 { this.UpdateCart(); } }