com.smartbear.readyapi.client.teststeps.groovyscript.GroovyScriptTestStepBuilder 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
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