Skip to content

Commit c034899

Browse files
committed
refactor: split interface definitions into separate files
1 parent 67c5bec commit c034899

File tree

2 files changed

+57
-54
lines changed

2 files changed

+57
-54
lines changed
Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using AngleSharp.Dom;
21
using Bunit.Rendering;
32

43
namespace Bunit;
@@ -15,56 +14,3 @@ internal interface IRenderedComponent : IDisposable
1514
/// </summary>
1615
void UpdateState(bool hasRendered, bool isMarkupGenerationRequired);
1716
}
18-
19-
/// <summary>
20-
/// Represents a rendered component.
21-
/// </summary>
22-
public interface IRenderedComponent<out TComponent> : IDisposable
23-
where TComponent : IComponent
24-
{
25-
/// <summary>
26-
/// Gets the component under test.
27-
/// </summary>
28-
TComponent Instance { get; }
29-
30-
/// <summary>
31-
/// Gets the HTML markup from the rendered fragment/component.
32-
/// </summary>
33-
string Markup { get; }
34-
35-
/// <summary>
36-
/// Gets a value indicating whether the rendered component or fragment has been disposed by the <see cref="BunitRenderer"/>.
37-
/// </summary>
38-
bool IsDisposed { get; }
39-
40-
/// <summary>
41-
/// Gets the id of the rendered component or fragment.
42-
/// </summary>
43-
int ComponentId { get; }
44-
45-
/// <summary>
46-
/// Gets the total number times the fragment has been through its render life-cycle.
47-
/// </summary>
48-
int RenderCount { get; }
49-
50-
/// <summary>
51-
/// Gets the AngleSharp <see cref="INodeList"/> based
52-
/// on the HTML markup from the rendered fragment/component.
53-
/// </summary>
54-
INodeList Nodes { get; }
55-
56-
/// <summary>
57-
/// Gets the <see cref="IServiceProvider"/> used when rendering the component.
58-
/// </summary>
59-
IServiceProvider Services { get; }
60-
61-
/// <summary>
62-
/// Adds or removes an event handler that will be triggered after each render of this <see cref="IRenderedComponent{TComponent}"/>.
63-
/// </summary>
64-
event EventHandler? OnAfterRender;
65-
66-
/// <summary>
67-
/// An event that is raised after the markup of the <see cref="IRenderedComponent{TComponent}"/> is updated.
68-
/// </summary>
69-
event EventHandler? OnMarkupUpdated;
70-
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
using AngleSharp.Dom;
2+
using Bunit.Rendering;
3+
4+
namespace Bunit;
5+
6+
/// <summary>
7+
/// Represents a rendered component.
8+
/// </summary>
9+
public interface IRenderedComponent<out TComponent> : IDisposable
10+
where TComponent : IComponent
11+
{
12+
/// <summary>
13+
/// Gets the component under test.
14+
/// </summary>
15+
TComponent Instance { get; }
16+
17+
/// <summary>
18+
/// Gets the HTML markup from the rendered fragment/component.
19+
/// </summary>
20+
string Markup { get; }
21+
22+
/// <summary>
23+
/// Gets a value indicating whether the rendered component or fragment has been disposed by the <see cref="BunitRenderer"/>.
24+
/// </summary>
25+
bool IsDisposed { get; }
26+
27+
/// <summary>
28+
/// Gets the id of the rendered component or fragment.
29+
/// </summary>
30+
int ComponentId { get; }
31+
32+
/// <summary>
33+
/// Gets the total number times the fragment has been through its render life-cycle.
34+
/// </summary>
35+
int RenderCount { get; }
36+
37+
/// <summary>
38+
/// Gets the AngleSharp <see cref="INodeList"/> based
39+
/// on the HTML markup from the rendered fragment/component.
40+
/// </summary>
41+
INodeList Nodes { get; }
42+
43+
/// <summary>
44+
/// Gets the <see cref="IServiceProvider"/> used when rendering the component.
45+
/// </summary>
46+
IServiceProvider Services { get; }
47+
48+
/// <summary>
49+
/// Adds or removes an event handler that will be triggered after each render of this <see cref="IRenderedComponent{TComponent}"/>.
50+
/// </summary>
51+
event EventHandler? OnAfterRender;
52+
53+
/// <summary>
54+
/// An event that is raised after the markup of the <see cref="IRenderedComponent{TComponent}"/> is updated.
55+
/// </summary>
56+
event EventHandler? OnMarkupUpdated;
57+
}

0 commit comments

Comments
 (0)