public void GetCartItemTest()
 {
     _ShopListPresentationModel.GetCurrentProduce("1", 0, "主機板");
     for (int i = 0; i < _ShopListPresentationModel.GetCartItem().Length; i++)
     {
         Assert.AreEqual(_ShopListPresentationModel.GetCartItem()[i], _productManagement.AllProducts[0].GetProductCartForm()[i]);
     }
 }
Esempio n. 2
0
 // 按下加入購物車後更新視窗
 private void UpdateAddToCart()
 {
     _shopListPresentationModel.AddItemToCart();                              // 加入購物車
     _addToCartButton.Enabled = false;
     _orderDataGridView.Rows.Add(_shopListPresentationModel.GetCartItem());   // 顯示物品到右邊表格
     _orderButton.Enabled  = _shopListPresentationModel.CheckConfirmButton(); // 確認訂購按鈕可以按下
     _totalPriceLabel.Text = this.GetTotalPrice().ToString(FORMAT);           // 顯示總價錢
 }