public async void StudentXFamilies_Not_Exists() { var mock = new ServiceMockFacade <IFamilyRepository>(); mock.RepositoryMock.Setup(x => x.StudentXFamilies(default(int), It.IsAny <int>(), It.IsAny <int>())).Returns(Task.FromResult <List <StudentXFamily> >(new List <StudentXFamily>())); 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 <ApiStudentXFamilyResponseModel> response = await service.StudentXFamilies(default(int)); response.Should().BeEmpty(); mock.RepositoryMock.Verify(x => x.StudentXFamilies(default(int), It.IsAny <int>(), It.IsAny <int>())); }