ISurveyListRepository
dependency is replaced by a mock in your test, your application probably uses an other implementation.
var mockModel = new List<SurveyList>();
mockRepository.Setup(x => x.GetSurveyList(testDate)).Returns(mockModel);
These lines make the mock return an empty list, that's probably why your test is failing.If you add some items to the list, your test will pass. On the other hand, the application uses a class implementing ISurveyListRepository
. Find that class and you will see why it's returning 5 items.