public async void ByArtistId_Not_Exists() { var mock = new ServiceMockFacade <IBankAccountRepository>(); mock.RepositoryMock.Setup(x => x.ByArtistId(It.IsAny <int>(), It.IsAny <int>(), It.IsAny <int>())).Returns(Task.FromResult <List <BankAccount> >(new List <BankAccount>())); var service = new BankAccountService(mock.LoggerMock.Object, mock.MediatorMock.Object, mock.RepositoryMock.Object, mock.ModelValidatorMockFactory.BankAccountModelValidatorMock.Object, mock.DALMapperMockFactory.DALBankAccountMapperMock); List <ApiBankAccountServerResponseModel> response = await service.ByArtistId(default(int)); response.Should().BeEmpty(); mock.RepositoryMock.Verify(x => x.ByArtistId(It.IsAny <int>(), It.IsAny <int>(), It.IsAny <int>())); }