use of org.apache.jmeter.engine.util.CompoundVariable in project jmeter by apache.
the class JMeterTestCaseJUnit method checkInvalidParameterCounts.
protected void checkInvalidParameterCounts(AbstractFunction func, int minimum) throws Exception {
Collection<CompoundVariable> parms = new LinkedList<>();
for (int c = 0; c < minimum; c++) {
try {
func.setParameters(parms);
fail("Should have generated InvalidVariableException for " + parms.size() + " parameters");
} catch (InvalidVariableException ignored) {
}
parms.add(new CompoundVariable());
}
func.setParameters(parms);
}
use of org.apache.jmeter.engine.util.CompoundVariable in project jmeter by apache.
the class JMeterTestCase method checkInvalidParameterCounts.
protected void checkInvalidParameterCounts(AbstractFunction func, int minimum) throws Exception {
Collection<CompoundVariable> parms = new LinkedList<>();
for (int c = 0; c < minimum; c++) {
try {
func.setParameters(parms);
fail("Should have generated InvalidVariableException for " + parms.size() + " parameters");
} catch (InvalidVariableException ignored) {
}
parms.add(new CompoundVariable());
}
func.setParameters(parms);
}
use of org.apache.jmeter.engine.util.CompoundVariable in project jmeter by apache.
the class TestTimeFunction method testMixed.
@Test
public void testMixed() throws Exception {
params.add(new CompoundVariable("G"));
variable.setParameters(params);
Locale locale = Locale.getDefault();
Locale.setDefault(Locale.ENGLISH);
value = variable.execute(result, null);
Locale.setDefault(locale);
assertEquals("AD", value);
}
use of org.apache.jmeter.engine.util.CompoundVariable in project jmeter by apache.
the class TestTimeFunction method testYMDnoV.
@Test
public void testYMDnoV() throws Exception {
params.add(new CompoundVariable("YMD"));
variable.setParameters(params);
value = variable.execute(result, null);
assertEquals(8, value.length());
assertNull(vars.get("NAME"));
}
use of org.apache.jmeter.engine.util.CompoundVariable in project jmeter by apache.
the class TestTimeFunction method testHMS.
@Test
public void testHMS() throws Exception {
params.add(new CompoundVariable("HMS"));
variable.setParameters(params);
value = variable.execute(result, null);
assertEquals(6, value.length());
}
Aggregations