Skip to content

Commit

Permalink
#5 XUnit tests
Browse files Browse the repository at this point in the history
- Fix test Should_Convert_Templates_To_Result
  • Loading branch information
araszka committed May 30, 2023
1 parent 73230ed commit 6905150
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ public void Should_Convert_Templates_To_Result(string template, dynamic data, st
_maniaTemplateEngine.AddTemplateFromString("test", template);
_maniaTemplateEngine.PreProcess("test", new[] { typeof(ManiaTemplateEngine).Assembly });

var result = _maniaTemplateEngine.Render("test", data, new[] { typeof(ManiaTemplateEngine).Assembly });
var pendingResult = _maniaTemplateEngine.RenderAsync("test", data, new[] { typeof(ManiaTemplateEngine).Assembly });
var result = pendingResult.Result;

Assert.Equal(expected, result, ignoreWhiteSpaceDifferences: true);
Assert.Equal(expected, result, ignoreLineEndingDifferences: true);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<manialink version="3" id="Mttest" name="EvoSC#-Mttest">
<frame>
<frame>
<test>
<label valign="center" textfont="GameFont" textsize="1" text="Nested controls" />
</test>
</frame>
</frame>
<script><!--
--></script>
</manialink>

0 comments on commit 6905150

Please sign in to comment.