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

io.cucumber.java8.Java8DefaultDataTableCellTransformerDefinition Maven / Gradle / Ivy

There is a newer version: 7.20.1
Show newest version
package io.cucumber.java8;

import io.cucumber.core.backend.DefaultDataTableCellTransformerDefinition;
import io.cucumber.datatable.TableCellByTypeTransformer;

class Java8DefaultDataTableCellTransformerDefinition extends AbstractDatatableElementTransformerDefinition
        implements DefaultDataTableCellTransformerDefinition {

    Java8DefaultDataTableCellTransformerDefinition(String[] emptyPatterns, DefaultDataTableCellTransformerBody body) {
        super(body, new Exception().getStackTrace()[3], emptyPatterns);
    }

    @Override
    public TableCellByTypeTransformer tableCellByTypeTransformer() {
        return (fromValue, toValueType) -> invokeMethod(
            replaceEmptyPatternsWithEmptyString(fromValue),
            toValueType);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy