@@ -6,45 +6,45 @@ namespace StoicDreams.BlazorUI.Components.Layouts;
6
6
7
7
public class BUIPageLayoutTests : TestFrameworkBlazor
8
8
{
9
- [ Theory ]
10
- [ InlineData ( "page-transitional" , true , false ) ]
11
- public void Verify_Render_FirstRender ( string expectedClass , bool intoView , bool isBackwards )
12
- {
13
- IRenderActions < BUIPageLayout > actions = ArrangeThisTest ( intoView , isBackwards , true ) ;
14
-
15
- actions . Act ( a => { } ) ;
16
-
17
- actions . Assert ( a =>
18
- {
19
- a . Render . Markup . Should ( ) . Contain ( "Mock Content" ) ;
20
- a . Render . Find ( ".page-transitional" ) . ClassName . Should ( ) . BeEquivalentTo ( expectedClass ) ;
21
- } ) ;
22
- }
23
-
24
- [ Theory ]
25
- [ InlineData ( "animate__fadeInDown" , true , false ) ]
26
- public void Verify_Render_SubsequentRenders ( string expectedClass , bool intoView , bool isBackwards )
27
- {
28
- IRenderActions < BUIPageLayout > actions = ArrangeThisTest ( intoView , isBackwards , false ) ;
29
-
30
- actions . Act ( a => { } ) ;
31
-
32
- actions . Assert ( a =>
33
- {
34
- a . Render . Markup . Should ( ) . Contain ( "Mock Content" ) ;
35
- a . Render . Find ( ".page-transitional" ) . ClassName . Should ( ) . Contain ( expectedClass ) ;
36
- } ) ;
37
- }
38
-
39
- private IRenderActions < BUIPageLayout > ArrangeThisTest ( bool intoView , bool isBackwards , bool isFirstRender )
40
- {
41
- return ArrangeRenderTest < BUIPageLayout > ( options =>
42
- {
43
- Dictionary < string , object > map = new ( ) ;
44
- IReadOnlyDictionary < string , object > roMap = new ReadOnlyDictionary < string , object > ( map ) ;
45
- RouteData routeData = new ( typeof ( Pages . BUIError ) , roMap ) ;
46
- options . Parameters . Add ( "Transition" , Transition . Create ( routeData , routeData , intoView , isBackwards , isFirstRender ) ) ;
47
- options . Parameters . Add ( "Body" , MockRender ( "Mock Content" ) ) ;
48
- } , this . StartupTestServices ) ;
49
- }
9
+ [ Theory ]
10
+ [ InlineData ( "page-transitional" , true , false ) ]
11
+ public void Verify_Render_FirstRender ( string expectedClass , bool intoView , bool isBackwards )
12
+ {
13
+ IRenderActions < BUIPageLayout > actions = ArrangeThisTest ( intoView , isBackwards , true ) ;
14
+
15
+ actions . Act ( a => { } ) ;
16
+
17
+ actions . Assert ( a =>
18
+ {
19
+ a . Render . Markup . Should ( ) . Contain ( "Mock Content" ) ;
20
+ a . Render . Find ( ".page-transitional" ) . ClassName . Should ( ) . BeEquivalentTo ( expectedClass ) ;
21
+ } ) ;
22
+ }
23
+
24
+ [ Theory ]
25
+ [ InlineData ( "animate__fadeInDown" , true , false ) ]
26
+ public void Verify_Render_SubsequentRenders ( string expectedClass , bool intoView , bool isBackwards )
27
+ {
28
+ IRenderActions < BUIPageLayout > actions = ArrangeThisTest ( intoView , isBackwards , false ) ;
29
+
30
+ actions . Act ( a => { } ) ;
31
+
32
+ actions . Assert ( a =>
33
+ {
34
+ a . Render . Markup . Should ( ) . Contain ( "Mock Content" ) ;
35
+ a . Render . Find ( ".page-transitional" ) . ClassName . Should ( ) . Contain ( expectedClass ) ;
36
+ } ) ;
37
+ }
38
+
39
+ private IRenderActions < BUIPageLayout > ArrangeThisTest ( bool intoView , bool isBackwards , bool isFirstRender )
40
+ {
41
+ return ArrangeRenderTest < BUIPageLayout > ( options =>
42
+ {
43
+ Dictionary < string , object ? > map = [ ] ;
44
+ IReadOnlyDictionary < string , object ? > roMap = new ReadOnlyDictionary < string , object ? > ( map ) ;
45
+ RouteData routeData = new ( typeof ( Pages . BUIError ) , roMap ) ;
46
+ options . Parameters . Add ( "Transition" , Transition . Create ( routeData , routeData , intoView , isBackwards , isFirstRender ) ) ;
47
+ options . Parameters . Add ( "Body" , MockRender ( "Mock Content" ) ) ;
48
+ } , this . StartupTestServices ) ;
49
+ }
50
50
}
0 commit comments