diff --git a/src/bunit/Diffing/BlazorDiffingHelpers.cs b/src/bunit/Diffing/BlazorDiffingHelpers.cs
index dab79c95e..605c59173 100644
--- a/src/bunit/Diffing/BlazorDiffingHelpers.cs
+++ b/src/bunit/Diffing/BlazorDiffingHelpers.cs
@@ -7,7 +7,7 @@ namespace Bunit.Diffing;
///
/// Blazor Diffing Helpers.
///
-public static class BlazorDiffingHelpers
+internal static class BlazorDiffingHelpers
{
///
/// Represents a diffing filter that removes all special Blazor attributes added by the /.
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/Diffing/HtmlComparer.cs b/src/bunit/Diffing/HtmlComparer.cs
index 9fc2180bc..97bac7138 100644
--- a/src/bunit/Diffing/HtmlComparer.cs
+++ b/src/bunit/Diffing/HtmlComparer.cs
@@ -10,7 +10,7 @@ namespace Bunit.Diffing;
///
/// Represents a test HTML comparer, that is configured to work with markup generated by the and classes.
///
-public sealed class HtmlComparer
+internal sealed class HtmlComparer
{
private readonly HtmlDiffer differenceEngine;
diff --git a/src/bunit/Extensions/BlazorExtensions.cs b/src/bunit/Extensions/BlazorExtensions.cs
index daba2f7cf..36b4a5618 100644
--- a/src/bunit/Extensions/BlazorExtensions.cs
+++ b/src/bunit/Extensions/BlazorExtensions.cs
@@ -3,7 +3,7 @@ namespace Bunit.Extensions;
///
/// Extensions for Blazor types.
///
-public static class BlazorExtensions
+internal static class BlazorExtensions
{
///
/// Creates a that will render the .
diff --git a/src/bunit/Extensions/BunitServiceProviderExtensions.cs b/src/bunit/Extensions/BunitServiceProviderExtensions.cs
index 4b89b03bb..f59dbbe82 100644
--- a/src/bunit/Extensions/BunitServiceProviderExtensions.cs
+++ b/src/bunit/Extensions/BunitServiceProviderExtensions.cs
@@ -12,7 +12,7 @@ namespace Bunit.Extensions;
///
/// Helper methods for correctly registering test dependencies.
///
-public static class BunitServiceProviderExtensions
+internal static class BunitServiceProviderExtensions
{
///
/// Registers the default services required by the web .
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
diff --git a/src/bunit/Rendering/BunitHtmlParser.cs b/src/bunit/Rendering/BunitHtmlParser.cs
index c2a41e18b..133e31edb 100644
--- a/src/bunit/Rendering/BunitHtmlParser.cs
+++ b/src/bunit/Rendering/BunitHtmlParser.cs
@@ -11,7 +11,7 @@ namespace Bunit.Rendering;
/// A AngleSharp based HTML Parse that can parse markup strings
/// into a .
///
-public sealed class BunitHtmlParser : IDisposable
+internal sealed class BunitHtmlParser : IDisposable
{
private const string TbodySubElements = "TR";
private const string ColgroupSubElement = "COL";