@@ -10,7 +10,7 @@ namespace Bunit;
1010/// <summary>
1111/// Helper methods for pretty printing markup from <see cref="INode"/> and <see cref="INodeList"/>.
1212/// </summary>
13- public static class NodePrintExtensions
13+ internal static class NodePrintExtensions
1414{
1515 /// <summary>
1616 /// Writes the serialization of the node guided by the formatter.
@@ -28,21 +28,6 @@ public static void ToHtml(this IEnumerable<INode> nodes, TextWriter writer, IMar
2828 }
2929 }
3030
31- /// <summary>
32- /// Uses the <see cref="DiffMarkupFormatter"/> to generate a HTML markup string
33- /// from a <see cref="IEnumerable{INode}"/> <paramref name="nodes"/>.
34- /// The generated HTML markup will NOT include the internal Blazor attributes
35- /// added to elements.
36- /// </summary>
37- public static string ToDiffMarkup ( this IEnumerable < INode > nodes )
38- {
39- ArgumentNullException . ThrowIfNull ( nodes ) ;
40-
41- using var sw = new StringWriter ( ) ;
42- nodes . ToHtml ( sw , new DiffMarkupFormatter ( ) ) ;
43- return sw . ToString ( ) ;
44- }
45-
4631 /// <summary>
4732 /// Uses the <see cref="DiffMarkupFormatter"/> to generate a HTML markup string
4833 /// from a <see cref="IMarkupFormattable"/> <paramref name="markupFormattable"/>.
@@ -58,42 +43,6 @@ public static string ToDiffMarkup(this IMarkupFormattable markupFormattable)
5843 return sw . ToString ( ) ;
5944 }
6045
61- /// <summary>
62- /// Uses the <see cref="PrettyMarkupFormatter"/> to generate a HTML markup string
63- /// from a <see cref="IEnumerable{INode}"/> <paramref name="nodes"/>.
64- /// </summary>
65- public static string ToMarkup ( this IEnumerable < INode > nodes )
66- {
67- ArgumentNullException . ThrowIfNull ( nodes ) ;
68-
69- using var sw = new StringWriter ( ) ;
70- var formatter = new PrettyMarkupFormatter
71- {
72- NewLine = Environment . NewLine ,
73- Indentation = " " ,
74- } ;
75- nodes . ToHtml ( sw , formatter ) ;
76- return sw . ToString ( ) ;
77- }
78-
79- /// <summary>
80- /// Uses the <see cref="PrettyMarkupFormatter"/> to generate a HTML markup
81- /// from a <see cref="IMarkupFormattable"/> <paramref name="markupFormattable"/>.
82- /// </summary>
83- public static string ToMarkup ( this IMarkupFormattable markupFormattable )
84- {
85- ArgumentNullException . ThrowIfNull ( markupFormattable ) ;
86-
87- using var sw = new StringWriter ( ) ;
88- var formatter = new PrettyMarkupFormatter
89- {
90- NewLine = Environment . NewLine ,
91- Indentation = " " ,
92- } ;
93- markupFormattable . ToHtml ( sw , formatter ) ;
94- return sw . ToString ( ) ;
95- }
96-
9746 /// <summary>
9847 /// Converts an <see cref="IElement"/> into a HTML markup string,
9948 /// with only its tag and attributes included in the output. All
0 commit comments