Skip to content

Commit 8974247

Browse files
committed
Adapted tests to new syntax
1 parent 22d882d commit 8974247

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

DocxTemplater.Test/DocxTemplateTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ public void ConditionsWithAndWithoutPrefix()
284284
new Paragraph(new Run(new Text("{?{ Test > 5 }}Test1{{ else }}else1{{ / }}"))),
285285
new Paragraph(new Run(new Text("{?{ ds.Test > 5}}Test2{{else}}else2{{/}}"))),
286286
new Paragraph(new Run(new Text("{?{ ds2.Test > 5}}Test3{{else}}else3{{/}}"))),
287-
new Paragraph(new Run(new Text("{?{ds3.MyBool}}Test4{{e}}else4{{/}}"))),
288-
new Paragraph(new Run(new Text("{?{!ds4.MyBool}}Test5{{e}}else4{{/}}")))
287+
new Paragraph(new Run(new Text("{?{ds3.MyBool}}Test4{{:}}else4{{/}}"))),
288+
new Paragraph(new Run(new Text("{?{!ds4.MyBool}}Test5{{:}}else4{{/}}")))
289289
));
290290
wpDocument.Save();
291291
memStream.Position = 0;
@@ -438,7 +438,7 @@ public void BindCollection()
438438
new Run(new Text("{{Items.Value}}")), // --> same as ds.Items.Value
439439
new Run(new Text("{{ds.Items.InnerCollection.Name}}")),
440440
new Run(new Text("{{Items.InnerCollection.InnerValue}}")), // --> same as ds.Items.InnerCollection.InnerValue
441-
new Run(new Text("{?{.NumericValue > 0 }}I'm only here if NumericValue is greater than 0 - {{ds.Items.InnerCollection.InnerValue}:toupper()}{{e}}I'm here if if this is not the case{{/}}")),
441+
new Run(new Text("{?{.NumericValue > 0 }}I'm only here if NumericValue is greater than 0 - {{ds.Items.InnerCollection.InnerValue}:toupper()}{{:}}I'm here if if this is not the case{{/}}")),
442442
new Run(new Text("{{/ds.Items.InnerCollection}}")),
443443
new Run(new Text("{{/Items}}")), // --> same as ds.Items.InnerCollection
444444
new Run(new Text("will be replaced {{company.Name}}"))

0 commit comments

Comments
 (0)