us.abstracta.jmeter.javadsl.codegeneration.params.StringParam Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jmeter-java-dsl Show documentation
Show all versions of jmeter-java-dsl Show documentation
Simple API to run JMeter performance tests in an VCS and programmers friendly way.
package us.abstracta.jmeter.javadsl.codegeneration.params;
/**
* Is a parameter with a string value.
*
* This implementation in particular takes care of proper escaping of characters for code
* generation.
*
* @since 0.45
*/
public class StringParam extends FixedParam {
public StringParam(String expression, String defaultValue) {
super(String.class, expression, v -> v, defaultValue);
}
public StringParam(String value) {
this(value, null);
}
@Override
public String buildCode(String indent) {
return buildStringLiteral(value == null ? "" : value, indent);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy