Пример #1
0
        //delete
        public void DeleteExistingCustomer_ShouldReturnTrue()
        {
            //Arrange
            Customer customer = _repo.GetCustomerByFirstName("Kanye");
            //Act
            bool removeCustomer = _repo.DeleteExistingCustomer("Kanye");

            //Assert
            Assert.IsTrue(removeCustomer);
        }
Пример #2
0
        private void DeleteCustomer()
        {
            ShowAllCustomers();
            Console.WriteLine("Which customer would you like to remove?\n" +
                              "Enter their first name");
            string input      = Console.ReadLine();
            bool   wasDeleted = _customerRepo.DeleteExistingCustomer(input);

            if (wasDeleted)
            {
                Console.WriteLine("Customer successfully deleted.");
            }
            else
            {
                Console.WriteLine("Customer could not be deleted.");
            }
        }