public async Task DeleteDownload_InvokeExpectedMethod() { await _service.DeleteDownload(new Download() { UseDownloadUrl = true }); _repositoryMock.Verify(c => c.DeleteAsync(It.IsAny <Download>()), Times.Once); _mediatorMock.Verify(c => c.Publish(It.IsAny <EntityDeleted <Download> >(), default), Times.Once); }