Пример #1
0
        public void TestGetBirthdayList()
        {
            var service         = new BirthdayMessageService(new AcmeApiService());
            var TodaysBirthDays = service.GetBirthdayList(DateTime.Today);

            Assert.IsTrue(TodaysBirthDays.Count > 0);
        }
Пример #2
0
        public void TestGetBirthdayListNonLeapYear()
        {
            var testDate        = new DateTime(2015, 2, 28);
            var service         = new BirthdayMessageService(new AcmeApiService());
            var TodaysBirthDays = service.GetBirthdayList(testDate);

            Assert.IsTrue(TodaysBirthDays.Count > 0);
        }
Пример #3
0
        public void TestGetBirthdayListExclusions()
        {
            var             testDate         = new DateTime(2015, 12, 21);
            var             service          = new BirthdayMessageService(new AcmeApiService());
            List <Employee> TodaysBirthDays  = service.GetBirthdayList(testDate);
            Employee        excludedEmployee = TodaysBirthDays.Where(s => s.id == 223).SingleOrDefault();

            Assert.IsTrue(excludedEmployee == null);
        }
Пример #4
0
        public void TestGetBirthdayListPositive()
        {
            var testDate        = new DateTime(1955, 10, 28);
            var service         = new BirthdayMessageService(new AcmeApiService());
            var TodaysBirthDays = service.GetBirthdayList(testDate);


            service.Send();
            Assert.IsTrue(TodaysBirthDays.Count > 0);
        }