1 package com.griddynamics.jagger.invoker.scenario;
3 import java.util.ArrayList;
6 import static java.lang.String.format;
20 private Integer stepsCounter = 0;
21 private final String scenarioId;
22 private final String scenarioDisplayName;
23 private List<JHttpUserScenarioStep> userScenarioSteps =
new ArrayList<>();
27 this.scenarioId = scenarioId;
28 this.scenarioDisplayName = scenarioDisplayName;
32 this.scenarioGlobalContext = scenarioGlobalContext;
37 if (!isStepIdUnique(userScenarioStep.
getStepId())) {
38 throw new IllegalArgumentException(format(
"Step id '%s' is not unique!", userScenarioStep.
getStepId()));
42 userScenarioSteps.add(userScenarioStep);
46 private boolean isStepIdUnique(String
id) {
55 return scenarioDisplayName;
59 return userScenarioSteps;
63 return userScenarioSteps.get(index);
67 return scenarioGlobalContext;