Пример #1
0
        public void AllFeedbackActuallyReturnsAllOfTheFeedback()
        {
            var feedbackRepository = new Mock <IRepository <ContactInfo> >();

            feedbackRepository.Setup(r => r.All()).Returns(new List <ContactInfo>()
            {
                new ContactInfo(),
                new ContactInfo(),
                new ContactInfo()
            }.AsQueryable());

            var service = new HomeService(null, null, feedbackRepository.Object);

            Assert.Equal(3, service.AllFeedback().Count());
        }