diff --git a/tests/Elastic.Markdown.Tests/CodeBlocks/CallOutTests.cs b/tests/Elastic.Markdown.Tests/CodeBlocks/CallOutTests.cs index cf4a70c13..0d3189d69 100644 --- a/tests/Elastic.Markdown.Tests/CodeBlocks/CallOutTests.cs +++ b/tests/Elastic.Markdown.Tests/CodeBlocks/CallOutTests.cs @@ -118,21 +118,23 @@ public void ParsesMagicCallOuts() => Block!.CallOuts [Fact] public void RendersExpectedHtml() => - Html.ReplaceLineEndings().Should().Contain(""" -
var x = 1;
- var y = x - 2;
- var z = y - 2;
-
- OUTPUT:
-var x = 1;
+ var y = x - 2;
+ var z = y - 2;
+
+ OUTPUT:
+This is an intermediate paragraph
-This is an intermediate paragraph
+Hello world
") - ; + Html.ShouldBeHtml("Hello world
"); } diff --git a/tests/Elastic.Markdown.Tests/Inline/AnchorLinkTests.cs b/tests/Elastic.Markdown.Tests/Inline/AnchorLinkTests.cs index a939884df..df39ee5f8 100644 --- a/tests/Elastic.Markdown.Tests/Inline/AnchorLinkTests.cs +++ b/tests/Elastic.Markdown.Tests/Inline/AnchorLinkTests.cs @@ -56,8 +56,7 @@ public class InPageAnchorTests(ITestOutputHelper output) : AnchorLinkTestBase(ou { [Fact] public void GeneratesHtml() => - // language=html - Html.Should().Contain( + Html.ShouldContainHtml( """""" ); diff --git a/tests/Elastic.Markdown.Tests/Inline/CommentTest.cs b/tests/Elastic.Markdown.Tests/Inline/CommentTest.cs index 3c8337aff..ebd941efc 100644 --- a/tests/Elastic.Markdown.Tests/Inline/CommentTest.cs +++ b/tests/Elastic.Markdown.Tests/Inline/CommentTest.cs @@ -14,18 +14,21 @@ not a comment { [Fact] - public void GeneratesAttributesInHtml() => + public void GeneratesAttributesInHtml() + { // language=html Html.Should().NotContain( - """% comment""" - ) - .And.Contain( - """
not a comment
""" - ).And.Be( + """% comment""" + ) + .And.Contain( + """
not a comment
""" + ); + Html.ShouldBeHtml( """not a comment
""" ); + } } public class MultipleLineCommentTest(ITestOutputHelper output) : InlineTest(output, @@ -43,23 +46,27 @@ also not a comment { [Fact] - public void GeneratesAttributesInHtml() => + public void GeneratesAttributesInHtml() + { // language=html - Html.ReplaceLineEndings().Should().NotContainAny( + Html.Should().NotContainAny( "") + "
-->" + ) .And.ContainAll( "
not a comment, and multi line comment below
", "also not a comment
" - ).And.Be( - """ -not a comment, and multi line comment below
-also not a comment
- """.ReplaceLineEndings() - ); + ); + Html.ShouldBeHtml( + """ +not a comment, and multi line comment below
+also not a comment
+ """ + ); + } } public class MultipleLineCommentWithLinkTest(ITestOutputHelper output) : InlineTest(output, @@ -80,7 +87,8 @@ also not a comment public void HasNoErrors() => Collector.Diagnostics.Should().HaveCount(0); [Fact] - public void GeneratesAttributesInHtml() => + public void GeneratesAttributesInHtml() + { // language=html Html.ReplaceLineEndings().Should().NotContainAny( "