Search in sources :

Example 6 with DataTableRow

use of gherkin.formatter.model.DataTableRow in project cucumber-jvm by cucumber.

the class CucumberScenarioOutlineTest method allows_data_table_entries_to_be_empty_after_replacement.

@Test
public void allows_data_table_entries_to_be_empty_after_replacement() {
    List<DataTableRow> rows = asList(new DataTableRow(C, asList("<entry>"), 1));
    Step outlineStep = new Step(C, null, "Some step", 0, rows, null);
    Step exampleStep = CucumberScenarioOutline.createExampleStep(outlineStep, new ExamplesTableRow(C, asList("entry"), 1, ""), new ExamplesTableRow(C, asList(""), 1, ""));
    assertEquals(asList(""), exampleStep.getRows().get(0).getCells());
}
Also used : ExamplesTableRow(gherkin.formatter.model.ExamplesTableRow) Step(gherkin.formatter.model.Step) DataTableRow(gherkin.formatter.model.DataTableRow) Test(org.junit.Test)

Example 7 with DataTableRow

use of gherkin.formatter.model.DataTableRow in project cucumber-jvm by cucumber.

the class FromDataTableTest method transposedListOfDoublesWithoutHeader.

private List<DataTableRow> transposedListOfDoublesWithoutHeader() {
    List<DataTableRow> rows = new ArrayList<DataTableRow>();
    rows.add(new DataTableRow(NO_COMMENTS, asList("100.5", "0.5", "1000"), 1));
    rows.add(new DataTableRow(NO_COMMENTS, asList("99.5", "-0.5", "999"), 2));
    return rows;
}
Also used : ArrayList(java.util.ArrayList) DataTableRow(gherkin.formatter.model.DataTableRow)

Example 8 with DataTableRow

use of gherkin.formatter.model.DataTableRow in project cucumber-jvm by cucumber.

the class FromDataTableTest method transposedListOfDatesAndCalWithHeader.

private List<DataTableRow> transposedListOfDatesAndCalWithHeader() {
    List<DataTableRow> rows = new ArrayList<DataTableRow>();
    rows.add(new DataTableRow(NO_COMMENTS, asList("Birth Date", "1957-05-10", ""), 1));
    rows.add(new DataTableRow(NO_COMMENTS, asList("Death Cal", "1979-02-02", ""), 2));
    return rows;
}
Also used : ArrayList(java.util.ArrayList) DataTableRow(gherkin.formatter.model.DataTableRow)

Example 9 with DataTableRow

use of gherkin.formatter.model.DataTableRow in project cucumber-jvm by cucumber.

the class FromDataTableTest method listOfDatesAndCalWithHeader.

private List<DataTableRow> listOfDatesAndCalWithHeader() {
    List<DataTableRow> rows = new ArrayList<DataTableRow>();
    rows.add(new DataTableRow(NO_COMMENTS, asList("Birth Date", "Death Cal"), 1));
    rows.add(new DataTableRow(NO_COMMENTS, asList("1957-05-10", "1979-02-02"), 2));
    rows.add(new DataTableRow(NO_COMMENTS, asList("", ""), 3));
    return rows;
}
Also used : ArrayList(java.util.ArrayList) DataTableRow(gherkin.formatter.model.DataTableRow)

Example 10 with DataTableRow

use of gherkin.formatter.model.DataTableRow in project cucumber-jvm by cucumber.

the class FromDataTableTest method transposedListOfDatesWithHeader.

private List<DataTableRow> transposedListOfDatesWithHeader() {
    List<DataTableRow> rows = new ArrayList<DataTableRow>();
    rows.add(new DataTableRow(NO_COMMENTS, asList("Birth Date", "1957-05-10"), 1));
    return rows;
}
Also used : ArrayList(java.util.ArrayList) DataTableRow(gherkin.formatter.model.DataTableRow)

Aggregations

DataTableRow (gherkin.formatter.model.DataTableRow)46 ArrayList (java.util.ArrayList)17 Test (org.junit.Test)9 List (java.util.List)6 And (cucumber.api.java.en.And)5 DataTable (cucumber.api.DataTable)4 DocString (gherkin.formatter.model.DocString)4 Step (gherkin.formatter.model.Step)4 Given (cucumber.api.java.en.Given)3 Then (cucumber.api.java.en.Then)3 LocalizedXStreams (cucumber.runtime.xstream.LocalizedXStreams)3 ExamplesTableRow (gherkin.formatter.model.ExamplesTableRow)3 Argument (gherkin.formatter.Argument)2 Arrays.asList (java.util.Arrays.asList)2 Map (java.util.Map)2 Pair (org.activityinfo.model.util.Pair)2 Usage (alien4cloud.model.common.Usage)1 Delta (cucumber.deps.difflib.Delta)1 I18n (gherkin.I18n)1 Row (gherkin.formatter.model.Row)1