@@ -22,12 +22,14 @@ public async Task StepperPreventStepChangeDirectionIsForwardWhenCompletingStepOn
2222 {
2323 // Arrange
2424 var lastStepChangeDirection = StepChangeDirection . None ;
25+ int _targetIndex = 0 ;
2526 var stepper = Context . RenderComponent < MudStepper > (
2627 ComponentParameterFactory . Parameter (
2728 nameof ( MudStepper . PreventStepChangeAsync ) ,
28- new Func < StepChangeDirection , Task < bool > > ( ( direction ) =>
29+ new Func < StepChangeDirection , int , Task < bool > > ( ( direction , targetIndex ) =>
2930 {
3031 lastStepChangeDirection = direction ;
32+ _targetIndex = targetIndex ;
3133 return Task . FromResult ( false ) ;
3234 } )
3335 )
@@ -48,12 +50,14 @@ public async Task StepperPreventStepChangeDirectionIsForwardWhenSkippingStepOneO
4850 {
4951 // Arrange
5052 var lastStepChangeDirection = StepChangeDirection . None ;
53+ int _targetIndex = 0 ;
5154 var stepper = Context . RenderComponent < MudStepper > (
5255 ComponentParameterFactory . Parameter (
5356 nameof ( MudStepper . PreventStepChangeAsync ) ,
54- new Func < StepChangeDirection , Task < bool > > ( ( direction ) =>
57+ new Func < StepChangeDirection , int , Task < bool > > ( ( direction , targetIndex ) =>
5558 {
5659 lastStepChangeDirection = direction ;
60+ _targetIndex = targetIndex ;
5761 return Task . FromResult ( false ) ;
5862 } )
5963 )
@@ -74,12 +78,14 @@ public async Task StepperPreventStepChangeDirectionIsForwardWhenChangingFromStep
7478 {
7579 // Arrange
7680 var lastStepChangeDirection = StepChangeDirection . None ;
81+ int _targetIndex = 0 ;
7782 var stepper = Context . RenderComponent < MudStepper > (
7883 ComponentParameterFactory . Parameter (
7984 nameof ( MudStepper . PreventStepChangeAsync ) ,
80- new Func < StepChangeDirection , Task < bool > > ( ( direction ) =>
85+ new Func < StepChangeDirection , int , Task < bool > > ( ( direction , targetIndex ) =>
8186 {
8287 lastStepChangeDirection = direction ;
88+ _targetIndex = targetIndex ;
8389 return Task . FromResult ( false ) ;
8490 } )
8591 )
@@ -104,12 +110,14 @@ public async Task StepperPreventStepChangeDirectionIsBackwardWhenChangingFromSte
104110 {
105111 // Arrange
106112 var lastStepChangeDirection = StepChangeDirection . None ;
113+ int _targetIndex = 0 ;
107114 var stepper = Context . RenderComponent < MudStepper > (
108115 ComponentParameterFactory . Parameter (
109116 nameof ( MudStepper . PreventStepChangeAsync ) ,
110- new Func < StepChangeDirection , Task < bool > > ( ( direction ) =>
117+ new Func < StepChangeDirection , int , Task < bool > > ( ( direction , targetIndex ) =>
111118 {
112119 lastStepChangeDirection = direction ;
120+ _targetIndex = targetIndex ;
113121 return Task . FromResult ( false ) ;
114122 } )
115123 )
@@ -137,7 +145,7 @@ public async Task StepperPreventStepChangeDirectionIsNoneWhenChangingToTheSameSt
137145 var stepper = Context . RenderComponent < MudStepper > (
138146 ComponentParameterFactory . Parameter (
139147 nameof ( MudStepper . PreventStepChangeAsync ) ,
140- new Func < StepChangeDirection , Task < bool > > ( ( direction ) =>
148+ new Func < StepChangeDirection , int , Task < bool > > ( ( direction , targetIndex ) =>
141149 {
142150 lastStepChangeDirection = direction ;
143151 return Task . FromResult ( false ) ;
@@ -164,7 +172,7 @@ public async Task StepperPreventStepChangeIsInvokedWhenCompletingActiveStepTest(
164172 var stepper = Context . RenderComponent < MudStepper > (
165173 ComponentParameterFactory . Parameter (
166174 nameof ( MudStepper . PreventStepChangeAsync ) ,
167- new Func < StepChangeDirection , Task < bool > > ( ( direction ) =>
175+ new Func < StepChangeDirection , int , Task < bool > > ( ( direction , targetIndex ) =>
168176 {
169177 preventStepChangeWasInvoked = true ;
170178 return Task . FromResult ( false ) ;
@@ -194,7 +202,7 @@ public async Task StepperPreventStepChangeIsInvokedWhenSkippingActiveStepTest()
194202 var stepper = Context . RenderComponent < MudStepper > (
195203 ComponentParameterFactory . Parameter (
196204 nameof ( MudStepper . PreventStepChangeAsync ) ,
197- new Func < StepChangeDirection , Task < bool > > ( ( direction ) =>
205+ new Func < StepChangeDirection , int , Task < bool > > ( ( direction , targetIndex ) =>
198206 {
199207 preventStepChangeWasInvoked = true ;
200208 return Task . FromResult ( false ) ;
@@ -224,7 +232,7 @@ public async Task StepperPreventStepChangeIsNotInvokedWhenCompletingNonActiveSte
224232 var stepper = Context . RenderComponent < MudStepper > (
225233 ComponentParameterFactory . Parameter (
226234 nameof ( MudStepper . PreventStepChangeAsync ) ,
227- new Func < StepChangeDirection , Task < bool > > ( ( direction ) =>
235+ new Func < StepChangeDirection , int , Task < bool > > ( ( direction , targetIndex ) =>
228236 {
229237 preventStepChangeWasInvoked = true ;
230238 return Task . FromResult ( false ) ;
@@ -254,7 +262,7 @@ public async Task StepperPreventStepChangeIsNotInvokedWhenSkippingNonActiveStepT
254262 var stepper = Context . RenderComponent < MudStepper > (
255263 ComponentParameterFactory . Parameter (
256264 nameof ( MudStepper . PreventStepChangeAsync ) ,
257- new Func < StepChangeDirection , Task < bool > > ( ( direction ) =>
265+ new Func < StepChangeDirection , int , Task < bool > > ( ( direction , targetIndex ) =>
258266 {
259267 preventStepChangeWasInvoked = true ;
260268 return Task . FromResult ( false ) ;
0 commit comments