public void Setup() { this.fileDownloader = new Mock <IGdeltFileDownloadService>(); this.zipService = new Mock <IGdeltUnZipService>(); this.csvToGdeltConverter = new Mock <ICsvToGdeltEventConverter>(); this.queueService = new Mock <IQueueService>(); var stream = GenerateStreamFromString("some-string-in-a-stream"); this.zipService.Setup(x => x.UnZip(It.IsAny <Stream>())).Returns(stream); this.csvToGdeltConverter.Setup(x => x.ConvertCsvLineToGdeltEvent(It.IsAny <string>(), It.IsAny <char>())).Returns( new GdeltEvent { GlobalEventID = 10 }); this.processFileHandler = new ProcessFileHandler(fileDownloader.Object, zipService.Object, csvToGdeltConverter.Object, queueService.Object); }
//private readonly ILogger log; public FilesProcessorFunction(IProcessFileHandler processFileHandler)//, ILogger log) { this.processFileHandler = processFileHandler; //this.log = log; }