public void AddProduct(string productName) { if (string.IsNullOrEmpty(productName)) { dialogHelper.ShowWarning("Select any one of the Suggested Product", "Caution!!!"); } else { double amount = 0; dbHelper.AddProduct(productName, out amount); view.UpdateQuantity(1); view.UpdateRate(amount); view.UpdateAmount(amount); UpdateValues(); } }
public void AddProductThatDoesntExist() { double amount = 0; mainDBHelper.InitializeNewBillEntry("Suresh", true); bool isAdded = mainDBHelper.AddProduct("Product", out amount); Assert.IsFalse(isAdded, "Product added to Bill entry, when it doesn't exist in database."); }