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

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

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

import io.cucumber.datatable.DataTable;

import java.util.List;

public final class DataTableArgument implements Argument {

    private final RawTableTransformer tableType;
    private final List> argument;

    DataTableArgument(RawTableTransformer tableType, List> argument) {
        this.tableType = tableType;
        this.argument = argument;
    }

    @Override
    public Object getValue() {
        return tableType.transform(argument);
    }

    public String getText() {
        return DataTable.create(argument).toString();
    }

    @Override
    public String toString() {
        return "Table:\n" + getText();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy