diff --git a/src/bunit/Diffing/DiffMarkupFormatter.cs b/src/bunit/Diffing/DiffMarkupFormatter.cs index e98fcc5fb..b7e621243 100644 --- a/src/bunit/Diffing/DiffMarkupFormatter.cs +++ b/src/bunit/Diffing/DiffMarkupFormatter.cs @@ -7,7 +7,7 @@ namespace Bunit.Diffing; /// /// A markup formatter, that skips any special Blazor attributes added by the . /// -public class DiffMarkupFormatter : PrettyMarkupFormatter, IMarkupFormatter +internal class DiffMarkupFormatter : PrettyMarkupFormatter, IMarkupFormatter { /// /// Initializes a new instance of the class. diff --git a/src/bunit/Extensions/NodePrintExtensions.cs b/src/bunit/Extensions/NodePrintExtensions.cs index 76b34822b..3613271ad 100644 --- a/src/bunit/Extensions/NodePrintExtensions.cs +++ b/src/bunit/Extensions/NodePrintExtensions.cs @@ -10,7 +10,7 @@ namespace Bunit; /// /// Helper methods for pretty printing markup from and . /// -public static class NodePrintExtensions +internal static class NodePrintExtensions { /// /// Writes the serialization of the node guided by the formatter. @@ -28,21 +28,6 @@ public static void ToHtml(this IEnumerable nodes, TextWriter writer, IMar } } - /// - /// Uses the to generate a HTML markup string - /// from a . - /// The generated HTML markup will NOT include the internal Blazor attributes - /// added to elements. - /// - public static string ToDiffMarkup(this IEnumerable nodes) - { - ArgumentNullException.ThrowIfNull(nodes); - - using var sw = new StringWriter(); - nodes.ToHtml(sw, new DiffMarkupFormatter()); - return sw.ToString(); - } - /// /// Uses the to generate a HTML markup string /// from a . @@ -58,42 +43,6 @@ public static string ToDiffMarkup(this IMarkupFormattable markupFormattable) return sw.ToString(); } - /// - /// Uses the to generate a HTML markup string - /// from a . - /// - public static string ToMarkup(this IEnumerable nodes) - { - ArgumentNullException.ThrowIfNull(nodes); - - using var sw = new StringWriter(); - var formatter = new PrettyMarkupFormatter - { - NewLine = Environment.NewLine, - Indentation = " ", - }; - nodes.ToHtml(sw, formatter); - return sw.ToString(); - } - - /// - /// Uses the to generate a HTML markup - /// from a . - /// - public static string ToMarkup(this IMarkupFormattable markupFormattable) - { - ArgumentNullException.ThrowIfNull(markupFormattable); - - using var sw = new StringWriter(); - var formatter = new PrettyMarkupFormatter - { - NewLine = Environment.NewLine, - Indentation = " ", - }; - markupFormattable.ToHtml(sw, formatter); - return sw.ToString(); - } - /// /// Converts an into a HTML markup string, /// with only its tag and attributes included in the output. All