All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.cucumber.stepexpression.PickleTableConverter Maven / Gradle / Ivy

There is a newer version: 7.18.1
Show newest version
package io.cucumber.stepexpression;

import gherkin.pickles.PickleCell;
import gherkin.pickles.PickleRow;
import gherkin.pickles.PickleTable;

import java.util.ArrayList;
import java.util.List;

class PickleTableConverter {
    static List> toTable(PickleTable pickleTable) {
        List> table = new ArrayList>();
        for (PickleRow pickleRow : pickleTable.getRows()) {
            List row = new ArrayList();
            for (PickleCell pickleCell : pickleRow.getCells()) {
                row.add(pickleCell.getValue());
            }
            table.add(row);
        }
        return table;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy