Tests.cs 931 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.Previewer;
  10. using QuestPDF.ReportSample.Layouts;
  11. namespace QuestPDF.ReportSample
  12. {
  13. public class ReportGeneration
  14. {
  15. private StandardReport Report { get; set; }
  16. [SetUp]
  17. public void SetUp()
  18. {
  19. QuestPDF.Settings.License = LicenseType.Community;
  20. var model = DataSource.GetReport();
  21. Report = new StandardReport(model);
  22. //ImagePlaceholder.Solid = true;
  23. }
  24. [Test]
  25. public void GeneratePdfAndShow()
  26. {
  27. Report.ShowInPreviewer();
  28. }
  29. [Test]
  30. public void GenerateXpsAndShow()
  31. {
  32. Report.GenerateXpsAndShow();
  33. }
  34. }
  35. }