RotateTests.cs 790 B

12345678910111213141516171819202122232425262728293031
  1. using NUnit.Framework;
  2. using QuestPDF.Drawing.SpacePlan;
  3. using QuestPDF.Elements;
  4. using QuestPDF.Infrastructure;
  5. using QuestPDF.UnitTests.TestEngine;
  6. namespace QuestPDF.UnitTests
  7. {
  8. [TestFixture]
  9. public class RotateTests
  10. {
  11. [Test]
  12. public void Measure() => SimpleContainerTests.Measure<Rotate>();
  13. [Test]
  14. public void Draw()
  15. {
  16. TestPlan
  17. .For(x => new Rotate
  18. {
  19. Child = x.CreateChild(),
  20. Angle = 123
  21. })
  22. .DrawElement(new Size(400, 300))
  23. .ExpectCanvasRotate(123)
  24. .ExpectChildDraw(new Size(400, 300))
  25. .ExpectCanvasRotate(-123)
  26. .CheckDrawResult();
  27. }
  28. }
  29. }