/**
* Loop on steps execution for a specific number of times.
*
* @param actual
* actual value for global condition.
* @param expected
* expected value for global condition.
* @param times
* Number of loops.
* @param steps
* List of steps run in a loop.
*/
@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 (TechnicalException e) {
throw new AssertError(Messages.getMessage(TechnicalException.TECHNICAL_SUBSTEP_ERROR_MESSAGE) + e.getMessage());
}
}
CommonSteps.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:NoraUi
作者:
评论列表
文章目录