private void DeleteCustomerContent() // DELETE CUSTOMER INFORMATION { Console.Clear(); ViewAllContent(); Console.WriteLine("\nEnter the full name of the customer to delete their profile:"); string input = Console.ReadLine().ToLower(); bool wasDeleted = _contentRepo.RemoveGreetingContent(input); if (wasDeleted) { Console.WriteLine("The customer profile was successfully deleted"); } else { Console.WriteLine("The customer profile could not be deleted."); } }
public void DeleteCustomerContentTest() // REMOVE CUSTOMER TEST { //ARRANGE SeedContentList(); string customerToDelete = "James Smith"; CustomerContent resultContent; //ACT resultContent = _testRepo.GetCustomerByName(customerToDelete); if (resultContent != null) { _testRepo.RemoveGreetingContent(customerToDelete); } else { Assert.IsNull("Customer does not exist in email list."); } resultContent = _testRepo.GetCustomerByName(customerToDelete); // ASSERT Assert.IsNull(resultContent); }