@@ -47,8 +47,7 @@ public class InlineLinkTests(ITestOutputHelper output) : LinkTestBase(output,
4747{
4848 [ Fact ]
4949 public void GeneratesHtml ( ) =>
50- // language=html
51- Html . Should ( ) . Be (
50+ Html . ShouldContainHtml (
5251 """<p><a href="/docs/_static/img/observability.png" hx-get="/docs/_static/img/observability.png" hx-select-oob="#main-container" hx-swap="none" hx-push-url="true" hx-indicator="#htmx-indicator" preload="mousedown">Elasticsearch</a></p>"""
5352 ) ;
5453
@@ -64,8 +63,7 @@ public class LinkToPageTests(ITestOutputHelper output) : LinkTestBase(output,
6463{
6564 [ Fact ]
6665 public void GeneratesHtml ( ) =>
67- // language=html
68- Html . Should ( ) . Contain (
66+ Html . ShouldContainHtml (
6967 """<p><a href="/docs/testing/req" hx-get="/docs/testing/req" hx-select-oob="#content-container,#toc-nav" hx-swap="none" hx-push-url="true" hx-indicator="#htmx-indicator" preload="mousedown">Requirements</a></p>"""
7068 ) ;
7169
@@ -84,8 +82,7 @@ public class InsertPageTitleTests(ITestOutputHelper output) : LinkTestBase(outpu
8482{
8583 [ Fact ]
8684 public void GeneratesHtml ( ) =>
87- // language=html
88- Html . Should ( ) . Contain (
85+ Html . ShouldContainHtml (
8986 """<p><a href="/docs/testing/req" hx-get="/docs/testing/req" hx-select-oob="#content-container,#toc-nav" hx-swap="none" hx-push-url="true" hx-indicator="#htmx-indicator" preload="mousedown">Special Requirements</a></p>"""
9087 ) ;
9188
@@ -106,8 +103,7 @@ public class RepositoryLinksTest(ITestOutputHelper output) : LinkTestBase(output
106103{
107104 [ Fact ]
108105 public void GeneratesHtml ( ) =>
109- // language=html
110- Html . Should ( ) . Contain (
106+ Html . ShouldContainHtml (
111107 """<p><a href="/docs/testing/req" hx-get="/docs/testing/req" hx-select-oob="#content-container,#toc-nav" hx-swap="none" hx-push-url="true" hx-indicator="#htmx-indicator" preload="mousedown">test</a></p>"""
112108 ) ;
113109
@@ -266,16 +262,16 @@ public class CommentedNonExistingLinks2(ITestOutputHelper output) : LinkTestBase
266262{
267263 [ Fact ]
268264 public void GeneratesHtml ( ) =>
269- // language=html
270- Html . ReplaceLineEndings ( ) . TrimEnd ( ) . Should ( ) . Be ( """
271- <p>Links:</p>
272- <ul>
273- <li><a href="/docs/testing/req" hx-get="/docs/testing/req" hx-select-oob="#content-container,#toc-nav" hx-swap="none" hx-push-url="true" hx-indicator="#htmx-indicator" preload="mousedown ">Special Requirements</a></li>
274- </ul>
275- <ul>
276- <li><a href="/docs/testing/req" hx-get="/docs/testing/req" hx-select-oob="#content-container,#toc-nav" hx-swap="none" hx-push-url="true" hx-indicator="#htmx-indicator" preload="mousedown ">Special Requirements</a></li>
277- </ul>
278- """ . ReplaceLineEndings ( ) ) ;
265+ Html . ShouldMatchHtml (
266+ """
267+ <p>Links:</p>
268+ <ul>
269+ <li><a href="/docs/testing/req">Special Requirements</a></li>
270+ </ul>
271+ <ul>
272+ <li><a href="/docs/testing/req">Special Requirements</a></li>
273+ </ul>
274+ """ ) ;
279275
280276 [ Fact ]
281277 public void HasErrors ( ) => Collector . Diagnostics . Should ( ) . HaveCount ( 0 ) ;
0 commit comments