Пример #1
0
        private void ShowACustomer()
        {
            Console.WriteLine("What is the customer ID you want to see?");
            int  customerID = int.Parse(Console.ReadLine());
            Crud crud       = _customerRepo.GetCustomerInfo(customerID);

            Console.WriteLine($"{crud.CustomerID} {crud.LastName} {crud.FirstName} {crud.CustomerType} {_customerType[(int)crud.CustomerType]}");
            Console.ReadLine();
        }
Пример #2
0
        public void GetIndividualInfo()
        {
            Crud_Repository repoInfo      = new Crud_Repository();
            Crud            customerInfo  = new Crud(1, "John", "Walters", CustomerType.Current);
            Crud            customerInfo2 = new Crud(2, "Jan", "Fittz", CustomerType.Current);

            repoInfo.AddCustomerToEmailList(customerInfo);
            repoInfo.AddCustomerToEmailList(customerInfo2);

            var expected = customerInfo2;
            var actual   = repoInfo.GetCustomerInfo(2);

            Assert.AreEqual(expected, actual);
        }