com.smartbear.readyapi.client.teststeps.propertytransfer.PropertyTransferTestStepBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ready-api-testserver-client Show documentation
Show all versions of ready-api-testserver-client Show documentation
Java client library for creating and executing test recipes against Ready!API TestServer
The newest version!
package com.smartbear.readyapi.client.teststeps.propertytransfer;
import com.smartbear.readyapi.client.model.PropertyTransfer;
import com.smartbear.readyapi.client.model.PropertyTransferTestStep;
import com.smartbear.readyapi.client.teststeps.TestStepBuilder;
import com.smartbear.readyapi.client.teststeps.TestStepTypes;
import java.util.ArrayList;
import java.util.List;
public class PropertyTransferTestStepBuilder implements TestStepBuilder {
private PropertyTransferTestStep testStep = new PropertyTransferTestStep();
private List propertyTransferBuilders = new ArrayList<>();
public PropertyTransferTestStepBuilder named(String name) {
testStep.setName(name);
return this;
}
public PropertyTransferTestStepBuilder addTransfer(PropertyTransferBuilder propertyTransferBuilder) {
this.propertyTransferBuilders.add(propertyTransferBuilder);
return this;
}
@Override
public PropertyTransferTestStep build() {
testStep.setType(TestStepTypes.PROPERTY_TRANSFER.getName());
List transfers = new ArrayList<>();
for (PropertyTransferBuilder propertyTransferBuilder : propertyTransferBuilders) {
transfers.add(propertyTransferBuilder.build());
}
testStep.setTransfers(transfers);
return testStep;
}
}