ImageTests.cs 522 B

12345678910111213141516171819202122232425
  1. using Moq;
  2. using NUnit.Framework;
  3. using QuestPDF.Elements;
  4. using QuestPDF.Infrastructure;
  5. namespace QuestPDF.UnitTests
  6. {
  7. [TestFixture]
  8. public class ImageTests
  9. {
  10. [Test]
  11. public void Draw_ShouldHandleNullChild()
  12. {
  13. Assert.DoesNotThrow(() =>
  14. {
  15. var image = new Image()
  16. {
  17. Data = null
  18. };
  19. image.Draw(It.IsAny<ICanvas>(), Size.Zero);
  20. });
  21. }
  22. }
  23. }