Пример #1
0
        public void TodaysBirthDates_Will_Skip_People_Without_Birth_Date()
        {
            var dateOfBirth = new DateTime(1950, 11, 11);

            repository.Add(new Person {
                Id = 42, DateOfBirthFrom = dateOfBirth, DateOfBirthUntil = dateOfBirth
            });
            repository.Add(new Person {
            });

            var result = (PartialViewResult)controller.BirthDates(dateOfBirth);
            var model  = (IQueryable <LinkablePersonModel>)result.Model;

            Assert.That(model.Count(), Is.EqualTo(1));
            Assert.That(model.First().Id, Is.EqualTo(42));
        }