use of org.apache.jmeter.engine.util.CompoundVariable in project jmeter by apache.
the class CSVReadFunctionTest method setCSVReadParams.
// Create the CSVRead function and set its parameters.
private static CSVRead setCSVReadParams(String p1, String p2) throws Exception {
CSVRead cr = new CSVRead();
Collection<CompoundVariable> parms = new LinkedList<>();
if (p1 != null) {
parms.add(new CompoundVariable(p1));
}
if (p2 != null) {
parms.add(new CompoundVariable(p2));
}
cr.setParameters(parms);
return cr;
}
use of org.apache.jmeter.engine.util.CompoundVariable in project jmeter by apache.
the class PackageTest method setCSVReadParams.
// Create the CSVRead function and set its parameters.
private static CSVRead setCSVReadParams(String p1, String p2) throws Exception {
CSVRead cr = new CSVRead();
Collection<CompoundVariable> parms = new LinkedList<>();
if (p1 != null) {
parms.add(new CompoundVariable(p1));
}
if (p2 != null) {
parms.add(new CompoundVariable(p2));
}
cr.setParameters(parms);
return cr;
}
use of org.apache.jmeter.engine.util.CompoundVariable in project jmeter by apache.
the class StringFromFileFunctionTest method SFFParams.
// Create the StringFromFile function and set its parameters.
private static StringFromFile SFFParams(String p1, String p2, String p3, String p4) throws Exception {
StringFromFile sff = new StringFromFile();
Collection<CompoundVariable> parms = new LinkedList<>();
if (p1 != null) {
parms.add(new CompoundVariable(p1));
}
if (p2 != null) {
parms.add(new CompoundVariable(p2));
}
if (p3 != null) {
parms.add(new CompoundVariable(p3));
}
if (p4 != null) {
parms.add(new CompoundVariable(p4));
}
sff.setParameters(parms);
return sff;
}
use of org.apache.jmeter.engine.util.CompoundVariable in project jmeter-plugins by undera.
the class SubstringTest method testSetParameters.
/**
* Test of setParameters method, of class Substring.
*/
@Test
public void testSetParameters() throws Exception {
System.out.println("setParameters");
Collection<CompoundVariable> parameters = new ArrayList<CompoundVariable>();
parameters.add(new CompoundVariable("test string"));
parameters.add(new CompoundVariable("0"));
parameters.add(new CompoundVariable("1"));
Substring instance = new Substring();
instance.setParameters(parameters);
instance.execute(null, null);
}
use of org.apache.jmeter.engine.util.CompoundVariable in project jmeter-plugins by undera.
the class SubstringTest method testExecute.
/**
* Test of execute method, of class Substring.
*/
@Test
public void testExecute() throws Exception {
System.out.println("execute 1");
Collection<CompoundVariable> parameters = new ArrayList<CompoundVariable>();
parameters.add(new CompoundVariable("test string"));
parameters.add(new CompoundVariable("5"));
parameters.add(new CompoundVariable("8"));
parameters.add(new CompoundVariable("var"));
Substring instance = new Substring();
instance.setParameters(parameters);
String expResult = "str";
String result = instance.execute(null, null);
Assert.assertEquals(expResult, result);
}
Aggregations