Ejemplo n.º 1
0
 // 提示庫存不足並且改回最大庫存
 private void NotifyOutOfStockAndChangeToMaximumStock(DataGridViewCellEventArgs e)
 {
     MessageBox.Show(OUT_OF_STOCK, STOCK_STATUS);
     _orderDataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = _shopListPresentationModel.ChangeToMaximumStock(e.RowIndex);
 }
 public void ChangeToMaximumStockTest()
 {
     _ShopListPresentationModel.GetCurrentProduce("1", 0, "主機板");
     _ShopListPresentationModel.AddItemToCart();
     Assert.AreEqual(_ShopListPresentationModel.ChangeToMaximumStock(0), "5");
 }