SimpleRotateTests.cs 777 B

123456789101112131415161718192021222324252627282930
  1. using QuestPDF.Fluent;
  2. using QuestPDF.Helpers;
  3. namespace QuestPDF.VisualTests;
  4. public class SimpleRotateTests
  5. {
  6. [Test]
  7. public void Rotate(
  8. [Values(0, 1, 2, 3)] int rotationCount)
  9. {
  10. VisualTest.PerformWithDefaultPageSettings(container =>
  11. {
  12. container
  13. .Width(150)
  14. .Height(150)
  15. .Element(element =>
  16. {
  17. foreach (var i in Enumerable.Range(0, rotationCount))
  18. element = element.RotateRight();
  19. return element;
  20. })
  21. .Shrink()
  22. .Background(Colors.Grey.Lighten3)
  23. .Padding(10)
  24. .Text($"Rotation #{rotationCount}");
  25. });
  26. }
  27. }