| 12345678910111213141516171819202122232425262728293031 |
- using NUnit.Framework;
- using QuestPDF.Elements;
- using QuestPDF.Infrastructure;
- using QuestPDF.UnitTests.TestEngine;
- namespace QuestPDF.UnitTests
- {
- [TestFixture]
- public class TranslateTests
- {
- [Test]
- public void Measure() => SimpleContainerTests.Measure<Translate>();
-
- [Test]
- public void Draw()
- {
- TestPlan
- .For(x => new Translate
- {
- Child = x.CreateChild(),
- TranslateX = 50,
- TranslateY = 75
- })
- .DrawElement(new Size(400, 300))
- .ExpectCanvasTranslate(50, 75)
- .ExpectChildDraw(new Size(400, 300))
- .ExpectCanvasTranslate(-50, -75)
- .CheckDrawResult();
- }
- }
- }
|