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

com.smartbear.readyapi.client.teststeps.groovyscript.GroovyScriptTestStepBuilder Maven / Gradle / Ivy

Go to download

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

The newest version!
package com.smartbear.readyapi.client.teststeps.groovyscript;

import com.smartbear.readyapi.client.model.GroovyScriptTestStep;
import com.smartbear.readyapi.client.teststeps.TestStepBuilder;
import com.smartbear.readyapi.client.teststeps.TestStepTypes;

/**
 * Builder for GroovyScriptTestStep objects.
 */
public class GroovyScriptTestStepBuilder implements TestStepBuilder {
    private final String scriptText;
    private String name;

    public GroovyScriptTestStepBuilder(String scriptText) {
        this.scriptText = scriptText;
    }

    public GroovyScriptTestStepBuilder named(String name) {
        this.name = name;
        return this;
    }


    @Override
    public GroovyScriptTestStep build() {
        GroovyScriptTestStep scriptTestStep = new GroovyScriptTestStep();
        scriptTestStep.setType(TestStepTypes.GROOVY_SCRIPT.getName());
        scriptTestStep.setScript(scriptText);
        scriptTestStep.setName(name);
        return scriptTestStep;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy