public async void All_ShouldReturnRecords() { var mock = new ServiceMockFacade <IFollowerService, IFollowerRepository>(); var records = new List <Follower>(); records.Add(new Follower()); mock.RepositoryMock.Setup(x => x.All(It.IsAny <int>(), It.IsAny <int>(), It.IsAny <string>())).Returns(Task.FromResult(records)); var service = new FollowerService(mock.LoggerMock.Object, mock.MediatorMock.Object, mock.RepositoryMock.Object, mock.ModelValidatorMockFactory.FollowerModelValidatorMock.Object, mock.DALMapperMockFactory.DALFollowerMapperMock); List <ApiFollowerServerResponseModel> response = await service.All(); response.Should().HaveCount(1); mock.RepositoryMock.Verify(x => x.All(It.IsAny <int>(), It.IsAny <int>(), It.IsAny <string>())); }