Пример #1
0
        public void _05_Challenge_RemoveCustomerBySpecification_ShouldBeCorrectCount()
        {
            //Arrange
            EmailProgramRepository _emailRepo = new EmailProgramRepository();
            EmailProgram           firstName  = new EmailProgram(CustomerData.NewCustomers, "Who", "Me", "*****@*****.**");


            _emailRepo.AddEmailProgramToList(firstName);
            _emailRepo.RemoveCustomerBySpecifications("Who", "Me", "*****@*****.**");

            //Act

            int actual   = _emailRepo.GetEmailProgram().Count;
            int expected = 0;

            //Assert
            Assert.AreEqual(expected, actual);
        }
Пример #2
0
        public void _05_Challenge_RemoveCustomerFromList_ShouldBeCorrectCount()
        {
            //Arrange
            EmailProgramRepository _emailRepo = new EmailProgramRepository();
            EmailProgram           firstName  = new EmailProgram();
            EmailProgram           lastName   = new EmailProgram();
            EmailProgram           email      = new EmailProgram();

            _emailRepo.AddEmailProgramToList(firstName);
            _emailRepo.AddEmailProgramToList(lastName);
            _emailRepo.AddEmailProgramToList(email);
            _emailRepo.RemoveCustomerEmail(firstName);
            //Act

            int actual   = _emailRepo.GetEmailProgram().Count;
            int expected = 2;

            //Assert
            Assert.AreEqual(expected, actual);
        }
Пример #3
0
        public void _05_Challenge_AddCustomerToList_ShouldBeCorrectCount()
        {
            //Arrange
            EmailProgramRepository _emailRepo = new EmailProgramRepository();
            EmailProgram           firstName  = new EmailProgram(CustomerData.NewCustomers, "Who", "Me", "who.me.com");
            EmailProgram           lastName   = new EmailProgram();
            EmailProgram           email      = new EmailProgram();

            //CustomerData type = CustomerData.OldCustomers;

            _emailRepo.AddEmailProgramToList(firstName);
            _emailRepo.AddEmailProgramToList(lastName);
            _emailRepo.AddEmailProgramToList(email);
            //Act

            int actual   = _emailRepo.GetEmailProgram().Count;
            int expected = 3;

            //Assert
            Assert.AreEqual(expected, actual);
        }
Пример #4
0
        public void _05_Challenge_UpdateCustomerInfo_ShouldBeCorrectCount()

        {
            //Arrange
            EmailProgramRepository _emailRepo = new EmailProgramRepository();
            EmailProgram           lastName   = new EmailProgram(CustomerData.CurrentCustomers, "Why", "When", "*****@*****.**");
            EmailProgram           firstName  = new EmailProgram();
            EmailProgram           LastName   = new EmailProgram();
            EmailProgram           email      = new EmailProgram();


            _emailRepo.RemoveCustomerBySpecifications("Why", "When", "*****@*****.**");
            _emailRepo.AddEmailProgramToList(firstName);
            _emailRepo.AddEmailProgramToList(LastName);
            _emailRepo.AddEmailProgramToList(email);

            //Act
            int actual   = _emailRepo.GetEmailProgram().Count;
            int expected = 3;


            //Assert
            Assert.AreEqual(expected, actual);
        }