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));
}
Aggregations