Tests.cs 953 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. using System.Diagnostics;
  3. using System.IO;
  4. using System.Linq;
  5. using NUnit.Framework;
  6. using QuestPDF.Drawing;
  7. using QuestPDF.Fluent;
  8. using QuestPDF.Infrastructure;
  9. using QuestPDF.ReportSample.Layouts;
  10. namespace QuestPDF.ReportSample
  11. {
  12. public class ReportGeneration
  13. {
  14. private StandardReport Report { get; set; }
  15. [SetUp]
  16. public void SetUp()
  17. {
  18. QuestPDF.Settings.License = LicenseType.Community;
  19. var model = DataSource.GetReport();
  20. Report = new StandardReport(model);
  21. //ImagePlaceholder.Solid = true;
  22. }
  23. [Test]
  24. public void GeneratePdfAndShow()
  25. {
  26. Settings.EnableDebugging = true;
  27. Report.GeneratePdfAndShow();
  28. }
  29. [Test]
  30. public void GenerateXpsAndShow()
  31. {
  32. Report.GenerateXpsAndShow();
  33. }
  34. }
  35. }