This commit is contained in:
@@ -31,6 +31,26 @@ public sealed class TemplatingTests : IDisposable
|
||||
Assert.Equal("line", Assert.IsType<ChartElement>(layout.Elements[6]).ChartType);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Systemvariablen_BrauchenKeineManifestDeklarationUndRendernMitSeitenzahlen()
|
||||
{
|
||||
var manifest = new TemplateManifest { Id = "system", Name = "Systemvariablen" };
|
||||
var layout = new LayoutParser().Parse("""
|
||||
PAGE 210 297 mm
|
||||
TEXT 20 10 "Stand: $$today" size=9
|
||||
TEXT 140 285 "Seite $$curPage von $$maxPageNum" size=9
|
||||
FLOWBOX 20 20 170 250 "Langer Inhalt für zwei Seiten.\nLanger Inhalt für zwei Seiten."
|
||||
""");
|
||||
var template = new LoadedTemplate(manifest, layout, new Dictionary<string, byte[]>());
|
||||
|
||||
var validation = new TemplateLoader().Validate(template, new Dictionary<string, PlaceholderType>());
|
||||
var pdf = new QuestTemplateRenderer().RenderToPdf(template,
|
||||
new DictionaryProvider(new Dictionary<string, PlaceholderValue>()));
|
||||
|
||||
Assert.True(validation.IsValid);
|
||||
Assert.Equal("%PDF", System.Text.Encoding.ASCII.GetString(pdf, 0, 4));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void FlowBox_FliesstAufFolgeseitenUndPaketEnthaeltFolgeseitenLayout()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user