public void RenderReport() { ReportConfig reportConfig = SetupReportConfig(); System.IO.File.Delete(reportConfig.SaveTo); _reportService = new ReportService(); _reportService.RenderReport(reportConfig); Assert.IsTrue(System.IO.File.Exists(reportConfig.SaveTo)); }
public void SendRenderedReport() { ReportRecipient recipient = new ReportRecipient(); recipient.Email = "*****@*****.**"; recipient.Name = "Marnee Dearman"; _emailService = SetupEmailService(); Email email = new Email(); email.To = recipient.Email; email.From = "*****@*****.**"; email.Message = "Report attached"; email.Subject = "ICMS TEST AUTO ORDER SEND"; email.Attachments = new List<string>(); ReportConfig reportConfig = SetupReportConfig(); System.IO.File.Delete(reportConfig.SaveTo); _reportService = new ReportService(); _reportService.RenderReport(reportConfig); email.Attachments.Add(@"C:\Users\Marnee Dearman\Documents\SK Auto\ICMS Excel Downloads\TESTattachments\test.txt"); _emailService.Send(email); }