use of gherkin.ast.Tag in project cucable-plugin by trivago.
the class GherkinToCucableConverterTest method convertGherkinExampleTableToCucableExampleMapTest.
@Test
public void convertGherkinExampleTableToCucableExampleMapTest() {
Location location = new Location(1, 2);
List<Tag> tags = new ArrayList<>();
Tag tag = new Tag(location, "@tag");
tags.add(tag);
String keyword = "keyword";
String name = "name";
String description = "description";
List<TableCell> headerCells = new ArrayList<>();
headerCells.add(new TableCell(location, "headerCell1"));
headerCells.add(new TableCell(location, "headerCell2"));
headerCells.add(new TableCell(location, "headerCell3"));
TableRow tableHeader = new TableRow(location, headerCells);
List<TableRow> tableBody = new ArrayList<>();
List<TableCell> bodyCells = new ArrayList<>();
bodyCells.add(new TableCell(location, "bodyCell1"));
bodyCells.add(new TableCell(location, "bodyCell2"));
bodyCells.add(new TableCell(location, "bodyCell3"));
tableBody.add(new TableRow(location, bodyCells));
bodyCells = new ArrayList<>();
bodyCells.add(new TableCell(location, "bodyCell4"));
bodyCells.add(new TableCell(location, "bodyCell5"));
bodyCells.add(new TableCell(location, "bodyCell6"));
tableBody.add(new TableRow(location, bodyCells));
Examples examples = new Examples(location, tags, keyword, name, description, tableHeader, tableBody);
List<String> includeTags = new ArrayList<>();
List<String> excludeTags = new ArrayList<>();
Map<String, List<String>> table = gherkinToCucableConverter.convertGherkinExampleTableToCucableExampleMap(examples);
assertThat(table.size(), is(3));
}