public void TestGetAllFollower() { IEnumerable <User> ienumableUsers = new List <User>() { user, userSecond }; mockFollowRepository.Setup(x => x.GetAllFollower(It.IsAny <string>())).Returns(ienumableUsers); var followService = new FollowService(mockFollowRepository.Object); IEnumerable <User> ienumableReturn = followService.GetAllFollower("5d111299f3b75e0001f4ed78"); User userActual = ienumableReturn.FirstOrDefault(); Assert.AreEqual(userActual, user); }