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

us.abstracta.jmeter.javadsl.codegeneration.params.StringArrayParam Maven / Gradle / Ivy

Go to download

Simple API to run JMeter performance tests in an VCS and programmers friendly way.

There is a newer version: 028
Show newest version
package us.abstracta.jmeter.javadsl.codegeneration.params;

import java.util.Arrays;
import java.util.stream.Collectors;

public class StringArrayParam extends FixedParam {

  public StringArrayParam(String expression) {
    super(String[].class, expression, e -> e.split(","), null);
  }

  @Override
  public String buildCode(String indent) {
    return Arrays.stream(value)
        .map(s -> buildStringLiteral(s, indent))
        .collect(Collectors.joining(", "));
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy