public void AnyVeroExists() { try { var customerIds = StoreManagerApplication.GetCustomerIdsByName("Vero"); Assert.True(customerIds.Any(), "Nobody with the name 'Vero' was found in the database"); } catch (Exception) { Assert.True(false); } }
private void SearchCustomersByName() { // get the name they wish to search for string userInput = CUI.PromptForInput("Enter the name in the format of 'first, last'", false); // get a list of the results var customerIds = StoreManagerApplication.GetCustomerIdsByName(userInput); if (customerIds.Any()) { // display the results customerIds.ForEach(cid => DisplayCustomer(cid, true)); } else { Console.WriteLine($"No customers found with name like '{userInput}'."); } }