Files

76 lines
2.2 KiB
C#
Raw Permalink Normal View History

2021-09-06 21:43:31 +02:00
using NUnit.Framework;
using QuestPDF.Drawing.Exceptions;
2021-09-06 21:43:31 +02:00
using QuestPDF.Examples.Engine;
using QuestPDF.Fluent;
using QuestPDF.Helpers;
namespace QuestPDF.Examples
{
public class DebuggingTesting
{
[Test]
2022-01-18 23:14:57 +01:00
public void Column()
2021-09-06 21:43:31 +02:00
{
Assert.Throws<DocumentLayoutException>(() =>
{
RenderingTest
.Create()
.PageSize(500, 360)
.Render(container =>
{
container
.Padding(10)
.Width(100)
.Background(Colors.Grey.Lighten3)
.DebugPointer("Example debug pointer")
.Column(x =>
{
x.Item().Text("Test");
x.Item().Width(150);
});
});
});
2021-09-06 21:43:31 +02:00
}
2021-12-06 09:28:02 +01:00
[Test]
public void Simple()
{
Assert.Throws<DocumentLayoutException>(() =>
{
RenderingTest
.Create()
.PageSize(500, 360)
.Render(container =>
{
container
.Padding(10)
.Width(100)
.Background(Colors.Grey.Lighten3)
.Width(150)
.Text("Test");
});
});
2021-12-06 09:28:02 +01:00
}
2021-12-06 09:28:02 +01:00
[Test]
public void DebugPointer()
{
Assert.Throws<DocumentLayoutException>(() =>
{
RenderingTest
.Create()
.PageSize(500, 360)
.Render(container =>
{
container
.Background(Colors.Grey.Lighten3)
.Padding(10)
.Width(100)
.DebugPointer("Example debug pointer")
.Width(150)
.Text("Example");
});
});
2021-12-06 09:28:02 +01:00
}
2021-09-06 21:43:31 +02:00
}
}