Search in sources :

Example 1 with DataMapperStepDefinition

use of io.syndesis.qe.entities.DataMapperStepDefinition in project syndesis-qe by syndesisio.

the class DataMapperSteps method mapDataMapperStep.

@When("MAP using Step {int} and field {string} to {string}")
public void mapDataMapperStep(int fromStep, String fromField, String toField) {
    DataMapperStepDefinition newDmStep = new DataMapperStepDefinition();
    newDmStep.setFromStep(fromStep);
    newDmStep.setInputFields(Collections.singletonList(fromField));
    newDmStep.setOutputFields(Collections.singletonList(toField));
    newDmStep.setMappingType(MappingType.MAP);
    newDmStep.setStrategy(null);
    super.getSteps().getLastStepDefinition().getDataMapperDefinition().getDataMapperStepDefinition().add(newDmStep);
}
Also used : DataMapperStepDefinition(io.syndesis.qe.entities.DataMapperStepDefinition) When(io.cucumber.java.en.When)

Example 2 with DataMapperStepDefinition

use of io.syndesis.qe.entities.DataMapperStepDefinition in project syndesis-qe by syndesisio.

the class DataMapperSteps method separateDataMapperStep.

@When("SEPARATE using Step {int} and strategy {string} and source {string} into targets")
public void separateDataMapperStep(int fromStep, String strategy, String sourceField, DataTable targetMappingData) {
    DataMapperStepDefinition newDmStep = new DataMapperStepDefinition();
    newDmStep.setFromStep(fromStep);
    newDmStep.setInputFields(Collections.singletonList(sourceField));
    newDmStep.setOutputFields(targetMappingData.transpose().asList(String.class));
    newDmStep.setMappingType(MappingType.SEPARATE);
    newDmStep.setStrategy(SeparatorType.valueOf(strategy));
    super.getSteps().getLastStepDefinition().getDataMapperDefinition().getDataMapperStepDefinition().add(newDmStep);
}
Also used : DataMapperStepDefinition(io.syndesis.qe.entities.DataMapperStepDefinition) When(io.cucumber.java.en.When)

Example 3 with DataMapperStepDefinition

use of io.syndesis.qe.entities.DataMapperStepDefinition in project syndesis-qe by syndesisio.

the class DataMapperSteps method combineDataMapperStep.

@When("COMBINE using Step {int} and strategy {string} into {string} and sources")
public void combineDataMapperStep(int fromStep, String strategy, String targetField, DataTable sourceMappingData) {
    DataMapperStepDefinition newDmStep = new DataMapperStepDefinition();
    newDmStep.setFromStep(fromStep);
    newDmStep.setInputFields(sourceMappingData.transpose().asList(String.class));
    newDmStep.setOutputFields(Collections.singletonList(targetField));
    newDmStep.setMappingType(MappingType.COMBINE);
    newDmStep.setStrategy(SeparatorType.valueOf(strategy));
    super.getSteps().getLastStepDefinition().getDataMapperDefinition().getDataMapperStepDefinition().add(newDmStep);
}
Also used : DataMapperStepDefinition(io.syndesis.qe.entities.DataMapperStepDefinition) When(io.cucumber.java.en.When)

Aggregations

When (io.cucumber.java.en.When)3 DataMapperStepDefinition (io.syndesis.qe.entities.DataMapperStepDefinition)3