Esempio n. 1
0
 public SELF step_$_of_scenario_$_has_a_data_table_as_parameter(
     @Table List<List<String>> dataTable) {
   StepModel step = getStep(1, 1);
   Word word = Word.argWord("a", "b", new DataTable(Table.HeaderType.HORIZONTAL, dataTable));
   step.addWords(word);
   latestWord = word;
   return self();
 }
Esempio n. 2
0
 public SELF case_$_has_a_when_step_$_with_argument_$_and_argument_name_$(
     int ncase, @Quoted String name, @Quoted String arg, @Quoted String argName) {
   lastArgWord = Word.argWord(argName, arg, arg);
   getCase(ncase)
       .addStep(
           new StepModel(
               name, Arrays.asList(Word.introWord("when"), new Word(name), lastArgWord)));
   return self();
 }
Esempio n. 3
0
  private void addDefaultCase(ScenarioModel scenarioModel) {
    ScenarioCaseModel scenarioCaseModel = new ScenarioCaseModel();
    scenarioModel.addCase(scenarioCaseModel);
    int i = 0;
    for (String param : scenarioModel.getExplicitParameters()) {
      scenarioCaseModel.addExplicitArguments("arg" + scenarioCaseModel.getCaseNr() + i++);
    }

    scenarioCaseModel.addStep(
        new StepModel(
            "something_happens", Arrays.asList(Word.introWord("given"), new Word("something"))));
    i = 0;
    for (String arg : scenarioCaseModel.getExplicitArguments()) {
      String argumentName = "stepArg" + i++;
      scenarioCaseModel.addStep(
          new StepModel(
              "something_happens",
              asList(Word.introWord("when"), Word.argWord(argumentName, arg, (String) null))));
    }
  }