2021-02-08 14:36:12 +01:00
|
|
|
using System;
|
2021-09-02 21:48:20 +02:00
|
|
|
using QuestPDF.Drawing;
|
2021-02-08 14:36:12 +01:00
|
|
|
using QuestPDF.Infrastructure;
|
|
|
|
|
|
|
|
|
|
namespace QuestPDF.UnitTests.TestEngine
|
|
|
|
|
{
|
|
|
|
|
internal class ElementMock : Element
|
|
|
|
|
{
|
|
|
|
|
public string Id { get; set; }
|
2021-09-02 21:48:20 +02:00
|
|
|
public Func<Size, SpacePlan> MeasureFunc { get; set; }
|
2021-02-08 14:36:12 +01:00
|
|
|
public Action<Size> DrawFunc { get; set; }
|
|
|
|
|
|
2021-09-02 21:48:20 +02:00
|
|
|
internal override SpacePlan Measure(Size availableSpace) => MeasureFunc(availableSpace);
|
2021-07-26 11:59:48 +02:00
|
|
|
internal override void Draw(Size availableSpace) => DrawFunc(availableSpace);
|
2021-02-08 14:36:12 +01:00
|
|
|
}
|
|
|
|
|
}
|