public async void Links_Not_Exists() { var mock = new ServiceMockFacade <IMachineRepository>(); mock.RepositoryMock.Setup(x => x.Links(default(int), It.IsAny <int>(), It.IsAny <int>())).Returns(Task.FromResult <List <Link> >(new List <Link>())); var service = new MachineService(mock.LoggerMock.Object, mock.RepositoryMock.Object, mock.ModelValidatorMockFactory.MachineModelValidatorMock.Object, mock.BOLMapperMockFactory.BOLMachineMapperMock, mock.DALMapperMockFactory.DALMachineMapperMock, mock.BOLMapperMockFactory.BOLLinkMapperMock, mock.DALMapperMockFactory.DALLinkMapperMock, mock.BOLMapperMockFactory.BOLMachineRefTeamMapperMock, mock.DALMapperMockFactory.DALMachineRefTeamMapperMock); List <ApiLinkResponseModel> response = await service.Links(default(int)); response.Should().BeEmpty(); mock.RepositoryMock.Verify(x => x.Links(default(int), It.IsAny <int>(), It.IsAny <int>())); }