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

cucumber.runtime.table.DiffTablePrinter Maven / Gradle / Ivy

There is a newer version: 7.18.1
Show newest version
package cucumber.runtime.table;

import cucumber.runtime.table.DataTableDiff.DiffType;

import java.util.List;

public class DiffTablePrinter extends TablePrinter {
    private final List diffTypes;

    public DiffTablePrinter(List diffTypes) {
        this.diffTypes = diffTypes;
    }

    @Override
    protected void printStartIndent(StringBuilder buffer, int rowIndex) {
        switch (diffTypes.get(rowIndex)) {
        case NONE:
            buffer.append("      ");
            break;
        case DELETE:
            buffer.append("    - ");
            break;
        case INSERT:
            buffer.append("    + ");
            break;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy