Skip to content

Commit 15b5ab0

Browse files
committed
Make stuff internal
1 parent 6728ad2 commit 15b5ab0

File tree

2 files changed

+2
-53
lines changed

2 files changed

+2
-53
lines changed

src/bunit/Diffing/DiffMarkupFormatter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Bunit.Diffing;
77
/// <summary>
88
/// A markup formatter, that skips any special Blazor attributes added by the <see cref="Htmlizer"/>.
99
/// </summary>
10-
public class DiffMarkupFormatter : PrettyMarkupFormatter, IMarkupFormatter
10+
internal class DiffMarkupFormatter : PrettyMarkupFormatter, IMarkupFormatter
1111
{
1212
/// <summary>
1313
/// Initializes a new instance of the <see cref="DiffMarkupFormatter"/> class.

src/bunit/Extensions/NodePrintExtensions.cs

Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)