public async void ByTeacherId_Not_Exists() { var mock = new ServiceMockFacade <IRateService, IRateRepository>(); mock.RepositoryMock.Setup(x => x.ByTeacherId(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.ByTeacherId(default(int)); response.Should().BeEmpty(); mock.RepositoryMock.Verify(x => x.ByTeacherId(It.IsAny <int>(), It.IsAny <int>(), It.IsAny <int>())); }