public async void ByTeacherSkillId_Not_Exists() { var mock = new ServiceMockFacade <IRateService, IRateRepository>(); mock.RepositoryMock.Setup(x => x.ByTeacherSkillId(It.IsAny <int>(), It.IsAny <int>(), It.IsAny <int>())).Returns(Task.FromResult <List <Rate> >(new List <Rate>())); var service = new RateService(mock.LoggerMock.Object, mock.MediatorMock.Object, mock.RepositoryMock.Object, mock.ModelValidatorMockFactory.RateModelValidatorMock.Object, mock.DALMapperMockFactory.DALRateMapperMock); List <ApiRateServerResponseModel> response = await service.ByTeacherSkillId(default(int)); response.Should().BeEmpty(); mock.RepositoryMock.Verify(x => x.ByTeacherSkillId(It.IsAny <int>(), It.IsAny <int>(), It.IsAny <int>())); }