77using Microsoft . JSInterop ;
88#endif
99
10- namespace Bunit . Rendering
10+ namespace Bunit . Rendering ;
11+
12+ /// <summary>
13+ /// Represents a <see cref="ITestRenderer"/> that is used when rendering
14+ /// Blazor components for the web.
15+ /// </summary>
16+ public class WebTestRenderer : TestRenderer
1117{
1218 /// <summary>
13- /// Represents a <see cref="ITestRenderer"/> that is used when rendering
14- /// Blazor components for the web.
19+ /// Initializes a new instance of the <see cref="WebTestRenderer"/> class.
1520 /// </summary>
16- public class WebTestRenderer : TestRenderer
21+ public WebTestRenderer ( IRenderedComponentActivator renderedComponentActivator , TestServiceProvider services , ILoggerFactory loggerFactory )
22+ : base ( renderedComponentActivator , services , loggerFactory )
1723 {
18- /// <summary>
19- /// Initializes a new instance of the <see cref="WebTestRenderer"/> class.
20- /// </summary>
21- public WebTestRenderer ( IRenderedComponentActivator renderedComponentActivator , TestServiceProvider services , ILoggerFactory loggerFactory )
22- : base ( renderedComponentActivator , services , loggerFactory )
23- {
2424#if NET5_0_OR_GREATER
25- ElementReferenceContext = new WebElementReferenceContext ( services . GetRequiredService < IJSRuntime > ( ) ) ;
25+ ElementReferenceContext = new WebElementReferenceContext ( services . GetRequiredService < IJSRuntime > ( ) ) ;
2626#endif
27- }
27+ }
2828
2929#if NET5_0_OR_GREATER
30- /// <summary>
31- /// Initializes a new instance of the <see cref="WebTestRenderer"/> class.
32- /// </summary>
33- public WebTestRenderer ( IRenderedComponentActivator renderedComponentActivator , TestServiceProvider services , ILoggerFactory loggerFactory , IComponentActivator componentActivator )
34- : base ( renderedComponentActivator , services , loggerFactory , componentActivator )
35- {
36- ElementReferenceContext = new WebElementReferenceContext ( services . GetRequiredService < IJSRuntime > ( ) ) ;
37- }
38- #endif
30+ /// <summary>
31+ /// Initializes a new instance of the <see cref="WebTestRenderer"/> class.
32+ /// </summary>
33+ public WebTestRenderer ( IRenderedComponentActivator renderedComponentActivator , TestServiceProvider services , ILoggerFactory loggerFactory , IComponentActivator componentActivator )
34+ : base ( renderedComponentActivator , services , loggerFactory , componentActivator )
35+ {
36+ ElementReferenceContext = new WebElementReferenceContext ( services . GetRequiredService < IJSRuntime > ( ) ) ;
3937 }
40- }
38+ #endif
39+ }
0 commit comments