@ Lorsque ( "Si '(.*)' vérifie '(.*)', je fais '(.*)' fois:") @ Then ( "If '(.*)' matches '(.*)', I do '(.*)' times:" ) public void loop ( String actual , String expected , int times , List < GherkinConditionedLoopedStep > steps ) { try { if ( new GherkinStepCondition ( "loopKey" , expected , actual ) . checkCondition ( ) ) { for ( int i = 0 ; i < times ; i ++ ) { runAllStepsInLoop ( steps ) ; } } } catch ( final TechnicalException e ) { throw new AssertError ( Messages . getMessage ( TechnicalException . TECHNICAL_SUBSTEP_ERROR_MESSAGE ) + e . getMessage ( ) ) ; } }
Loops on steps execution for a specific number of times .