11
11
12
12
namespace Microsoft . AspNetCore . Components . Test
13
13
{
14
- public class LayoutTest
14
+ public class PageDisplayTest
15
15
{
16
16
private TestRenderer _renderer = new TestRenderer ( ) ;
17
- private LayoutDisplay _layoutDisplayComponent = new LayoutDisplay ( ) ;
18
- private int _layoutDisplayComponentId ;
17
+ private PageDisplay _pageDisplayComponent = new PageDisplay ( ) ;
18
+ private int _pageDisplayComponentId ;
19
19
20
- public LayoutTest ( )
20
+ public PageDisplayTest ( )
21
21
{
22
22
_renderer = new TestRenderer ( ) ;
23
- _layoutDisplayComponent = new LayoutDisplay ( ) ;
24
- _layoutDisplayComponentId = _renderer . AssignRootComponentId ( _layoutDisplayComponent ) ;
23
+ _pageDisplayComponent = new PageDisplay ( ) ;
24
+ _pageDisplayComponentId = _renderer . AssignRootComponentId ( _pageDisplayComponent ) ;
25
25
}
26
26
27
27
[ Fact ]
28
28
public void DisplaysComponentInsideLayout ( )
29
29
{
30
30
// Arrange/Act
31
- _renderer . Invoke ( ( ) => _layoutDisplayComponent . SetParametersAsync ( ParameterCollection . FromDictionary ( new Dictionary < string , object >
31
+ _renderer . Invoke ( ( ) => _pageDisplayComponent . SetParametersAsync ( ParameterCollection . FromDictionary ( new Dictionary < string , object >
32
32
{
33
- { LayoutDisplay . NameOfPage , typeof ( ComponentWithLayout ) }
33
+ { PageDisplay . NameOfPage , typeof ( ComponentWithLayout ) }
34
34
} ) ) ) ;
35
35
36
36
// Assert
@@ -85,9 +85,9 @@ public void DisplaysComponentInsideLayout()
85
85
public void DisplaysComponentInsideNestedLayout ( )
86
86
{
87
87
// Arrange/Act
88
- _renderer . Invoke ( ( ) => _layoutDisplayComponent . SetParametersAsync ( ParameterCollection . FromDictionary ( new Dictionary < string , object >
88
+ _renderer . Invoke ( ( ) => _pageDisplayComponent . SetParametersAsync ( ParameterCollection . FromDictionary ( new Dictionary < string , object >
89
89
{
90
- { LayoutDisplay . NameOfPage , typeof ( ComponentWithNestedLayout ) }
90
+ { PageDisplay . NameOfPage , typeof ( ComponentWithNestedLayout ) }
91
91
} ) ) ) ;
92
92
93
93
// Assert
@@ -112,15 +112,15 @@ public void DisplaysComponentInsideNestedLayout()
112
112
public void CanChangeDisplayedPageWithSameLayout ( )
113
113
{
114
114
// Arrange
115
- _renderer . Invoke ( ( ) => _layoutDisplayComponent . SetParametersAsync ( ParameterCollection . FromDictionary ( new Dictionary < string , object >
115
+ _renderer . Invoke ( ( ) => _pageDisplayComponent . SetParametersAsync ( ParameterCollection . FromDictionary ( new Dictionary < string , object >
116
116
{
117
- { LayoutDisplay . NameOfPage , typeof ( ComponentWithLayout ) }
117
+ { PageDisplay . NameOfPage , typeof ( ComponentWithLayout ) }
118
118
} ) ) ) ;
119
119
120
120
// Act
121
- _renderer . Invoke ( ( ) => _layoutDisplayComponent . SetParametersAsync ( ParameterCollection . FromDictionary ( new Dictionary < string , object >
121
+ _renderer . Invoke ( ( ) => _pageDisplayComponent . SetParametersAsync ( ParameterCollection . FromDictionary ( new Dictionary < string , object >
122
122
{
123
- { LayoutDisplay . NameOfPage , typeof ( DifferentComponentWithLayout ) }
123
+ { PageDisplay . NameOfPage , typeof ( DifferentComponentWithLayout ) }
124
124
} ) ) ) ;
125
125
126
126
// Assert
@@ -163,15 +163,15 @@ public void CanChangeDisplayedPageWithSameLayout()
163
163
public void CanChangeDisplayedPageWithDifferentLayout ( )
164
164
{
165
165
// Arrange
166
- _renderer . Invoke ( ( ) => _layoutDisplayComponent . SetParametersAsync ( ParameterCollection . FromDictionary ( new Dictionary < string , object >
166
+ _renderer . Invoke ( ( ) => _pageDisplayComponent . SetParametersAsync ( ParameterCollection . FromDictionary ( new Dictionary < string , object >
167
167
{
168
- { LayoutDisplay . NameOfPage , typeof ( ComponentWithLayout ) }
168
+ { PageDisplay . NameOfPage , typeof ( ComponentWithLayout ) }
169
169
} ) ) ) ;
170
170
171
171
// Act
172
- _renderer . Invoke ( ( ) => _layoutDisplayComponent . SetParametersAsync ( ParameterCollection . FromDictionary ( new Dictionary < string , object >
172
+ _renderer . Invoke ( ( ) => _pageDisplayComponent . SetParametersAsync ( ParameterCollection . FromDictionary ( new Dictionary < string , object >
173
173
{
174
- { LayoutDisplay . NameOfPage , typeof ( ComponentWithNestedLayout ) }
174
+ { PageDisplay . NameOfPage , typeof ( ComponentWithNestedLayout ) }
175
175
} ) ) ) ;
176
176
177
177
// Assert
0 commit comments