Search in sources :

Example 1 with StepsStorage

use of io.syndesis.qe.storage.StepsStorage in project syndesis-qe by syndesisio.

the class UtilitySteps method changeDatashapeTo.

@Given("change {string} datashape of previous step to {string} type with specification {string}")
public void changeDatashapeTo(String direction, String type, String specification) {
    Step lastStep = super.getSteps().getLastStepDefinition().getStep();
    Step withDatashape = new Step.Builder().createFrom(lastStep).action(super.withCustomDatashape(lastStep.getAction().get(), super.getConnectorDescriptor(lastStep.getAction().get(), lastStep.getConfiguredProperties(), lastStep.getConnection().get().getId().get()), direction, DataShapeKinds.valueOf(type), specification)).build();
    StepsStorage steps = super.getSteps();
    steps.getStepDefinitions().remove(steps.getStepDefinitions().size() - 1);
    steps.getStepDefinitions().add(new StepDefinition(withDatashape));
}
Also used : StepsStorage(io.syndesis.qe.storage.StepsStorage) StepDefinition(io.syndesis.qe.entities.StepDefinition) Step(io.syndesis.common.model.integration.Step) Given(io.cucumber.java.en.Given)

Aggregations

Given (io.cucumber.java.en.Given)1 Step (io.syndesis.common.model.integration.Step)1 StepDefinition (io.syndesis.qe.entities.StepDefinition)1 StepsStorage (io.syndesis.qe.storage.StepsStorage)1