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

com.smartbear.readyapi.client.teststeps.propertytransfer.PropertyTransferTestStepBuilder Maven / Gradle / Ivy

Go to download

Java client library for creating and executing test recipes against Ready!API TestServer

There is a newer version: 1.2.1
Show 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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy