public void TestEmailToSend() { //Arrange Customer customer = new Customer(); string FirstName = "Brittany"; string LastName = "Korycki"; string TypeOfCustomer = "past"; string EmailAddress = "*****@*****.**"; //Act customer.FirstName = FirstName; customer.LastName = LastName; customer.TypeOfCustomer = TypeOfCustomer; customer.EmailAddress = EmailAddress; //Assert Assert.IsTrue(customerRepo.EmailToSend(customer.TypeOfCustomer, customer.EmailAddress), "email not sent"); }
//Create private void CreateCustomer() { string type = String.Empty; Console.Clear(); Customer newCustomer = new Customer(); Console.WriteLine("Enter the customer's first name:"); newCustomer.FirstName = Console.ReadLine(); Console.WriteLine("Enter the customer's last name:"); newCustomer.LastName = Console.ReadLine(); while (type.ToLower() != "past" && type.ToLower() != "current" && type.ToLower() != "potential") { Console.WriteLine("Please enter the type of customer:"); type = Console.ReadLine(); } newCustomer.TypeOfCustomer = type; Console.WriteLine("Enter the customer's email address:"); newCustomer.EmailAddress = Console.ReadLine(); _customerRepo.AddCustomer(newCustomer); _customerRepo.EmailToSend(newCustomer.TypeOfCustomer, newCustomer.EmailAddress); }