Example #1
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();
 }
Example #2
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();
 }
Example #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))));
    }
  }
Example #4
0
 public SELF header_type_set_to(Table.HeaderType headerType) {
   latestWord.getArgumentInfo().getDataTable().setHeaderType(headerType);
   return self();
 }
Example #5
0
 public SELF formatted_value(@Quoted String formattedValue) {
   lastArgWord.getArgumentInfo().setFormattedValue(formattedValue);
   return self();
 }
Example #6
0
 public SELF case_$_has_step_$(int ncase, String name) {
   getCase(ncase)
       .addStep(new StepModel(name, Arrays.asList(Word.introWord("when"), new Word(name))));
   return self();
 }