File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 33namespace Bunit . Diffing
44{
55 /// <summary>
6- /// Blazor Dffing Helpers
6+ /// Blazor Diffing Helpers
77 /// </summary>
88 public static class BlazorDiffingHelpers
99 {
1010 /// <summary>
1111 /// Represents a diffing filter that removes all special Blazor attributes added by the /<see cref="Htmlizer"/>.
1212 /// </summary>
13- public static FilterDecision BlazorEventHandlerIdAttrFilter ( in AttributeComparisonSource attrSource , FilterDecision currentDecision )
13+ public static FilterDecision BlazorAttributeFilter ( in AttributeComparisonSource attrSource , FilterDecision currentDecision )
1414 {
1515 if ( currentDecision == FilterDecision . Exclude )
1616 return currentDecision ;
@@ -19,7 +19,6 @@ public static FilterDecision BlazorEventHandlerIdAttrFilter(in AttributeComparis
1919 return FilterDecision . Exclude ;
2020
2121 return currentDecision ;
22- }
22+ }
2323 }
24-
2524}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public HtmlComparer()
2222 {
2323 var strategy = new DiffingStrategyPipeline ( ) ;
2424 strategy . AddDefaultOptions ( ) ;
25- strategy . AddFilter ( BlazorDiffingHelpers . BlazorEventHandlerIdAttrFilter , StrategyType . Specialized ) ;
25+ strategy . AddFilter ( BlazorDiffingHelpers . BlazorAttributeFilter , StrategyType . Specialized ) ;
2626 _differenceEngine = new HtmlDiffer ( strategy ) ;
2727 }
2828
Original file line number Diff line number Diff line change @@ -37,7 +37,9 @@ public BunitHtmlParser() : this(Configuration.Default.WithCss().With(new HtmlCom
3737 /// with the <paramref name="testRenderer"/> registered.
3838 /// </summary>
3939 public BunitHtmlParser ( ITestRenderer testRenderer , HtmlComparer htmlComparer )
40- : this ( Configuration . Default . WithCss ( ) . With ( testRenderer ) . With ( htmlComparer ) ) { }
40+ : this ( Configuration . Default . WithCss ( )
41+ . With ( testRenderer ?? throw new ArgumentNullException ( nameof ( testRenderer ) ) )
42+ . With ( htmlComparer ?? throw new ArgumentNullException ( nameof ( htmlComparer ) ) ) ) { }
4143
4244 private BunitHtmlParser ( IConfiguration angleSharpConfiguration )
4345 {
You can’t perform that action at this time.
0 commit comments