public void UpdateCustomerTest() { CustomerCRUD.addCustomer(77, "Ellen", "DeGeneres"); Assert.IsTrue(CustomerCRUD.updateLastName(77, "Page")); Assert.AreEqual(CustomerCRUD.GetCustomer(77).customer_l_name, "Page"); Assert.IsTrue(CustomerCRUD.updateName(77, "Elliot")); Assert.AreEqual(CustomerCRUD.GetCustomerByLastName("Page").customer_f_name, "Elliot"); CustomerCRUD.deleteCustomer(77); }
public void EditCustomer() { bool editedN = CustomerCRUD.updateName(currentCustomer.customer_id, currentCustomer.customer_f_name); bool editedF = CustomerCRUD.updateLastName(currentCustomer.customer_id, currentCustomer.customer_l_name); if (editedN && editedF) { actionText = "Customer Edited"; } else { actionText = "Oh nooo something went wrong"; } MessageBoxShowDelegate(ActionText); }