public async void Students_Not_Exists() { var mock = new ServiceMockFacade <IFamilyRepository>(); mock.RepositoryMock.Setup(x => x.Students(default(int), It.IsAny <int>(), It.IsAny <int>())).Returns(Task.FromResult <List <Student> >(new List <Student>())); var service = new FamilyService(mock.LoggerMock.Object, mock.RepositoryMock.Object, mock.ModelValidatorMockFactory.FamilyModelValidatorMock.Object, mock.BOLMapperMockFactory.BOLFamilyMapperMock, mock.DALMapperMockFactory.DALFamilyMapperMock, mock.BOLMapperMockFactory.BOLStudentMapperMock, mock.DALMapperMockFactory.DALStudentMapperMock, mock.BOLMapperMockFactory.BOLStudentXFamilyMapperMock, mock.DALMapperMockFactory.DALStudentXFamilyMapperMock); List <ApiStudentResponseModel> response = await service.Students(default(int)); response.Should().BeEmpty(); mock.RepositoryMock.Verify(x => x.Students(default(int), It.IsAny <int>(), It.IsAny <int>())); }