private static string GenerateReport(TestSession testSession)
        {
            var ms = new MemoryStream();
            var sw = new StreamWriter(ms);
            var htmlReportGenerator = new HtmlReportGenerator(sw);

            htmlReportGenerator.Generate(testSession);
            return(Encoding.UTF8.GetString(ms.ToArray()));
        }
Beispiel #2
0
        public string CreateReport(IEnumerable <LoanApplicationNotified> loanApplications)
        {
            LoanApplicationBll[] loanApplicationModels = loanApplications
                                                         .Select(x => this._mapper.Map <LoanApplicationBll>(x))
                                                         .ToArray();

            string reportFileSource = HtmlReportGenerator.Generate(loanApplicationModels);

            return(reportFileSource);
        }
Beispiel #3
0
 public void SaveReport(TestSession testSession, FileInfo file)
 {
     using (FileStream fs = file.OpenWrite())
     {
         using (StreamWriter sw = new StreamWriter(fs))
         {
             IReportGenerator reportGenerator = new HtmlReportGenerator(sw);
             reportGenerator.Generate(testSession);
         }
     }
 }