public void Download_WhenValidInputShouldDownloadBlobToCsvFile()
        {
            var downloadedReport = new DownloadReport()
            {
                FileName = "DummyFile.csv",
                Stream   = new MemoryStream()
            };

            ReportingBusiness.Setup(x => x.GetDownloadStream(It.IsAny <string>(), It.IsAny <string>())).Returns(Task.FromResult(downloadedReport));

            var generateReport = (FileStreamResult)EnrichedEventController.Download(It.IsAny <string>(), It.IsAny <string>()).Result;

            IsNotNull(generateReport);
            AreEqual(generateReport.FileDownloadName, downloadedReport.FileName);
            AreEqual(generateReport.ContentType, "application/csv");
        }
Exemple #2
0
 public void Report(DownloadInfo value)
 {
     DownloadReport?.Invoke(value);
 }
 public ReportController()
 {
     obj = new DownloadReport();
 }