use of org.apache.jmeter.config.ConfigTestElement in project jmeter by apache.
the class PackageTest method testRecovery.
@Test
public void testRecovery() throws Exception {
ConfigTestElement config = new ConfigTestElement();
config.addProperty(new StringProperty("name", "config"));
config.setRunningVersion(true);
LoginConfig loginConfig = new LoginConfig();
loginConfig.setUsername("user1");
loginConfig.setPassword("pass1");
assertTrue(config.getProperty("login") instanceof NullProperty);
// This test should work whether or not all Nulls are equal
assertEquals(new NullProperty("login"), config.getProperty("login"));
config.addProperty(new TestElementProperty("login", loginConfig));
assertEquals(loginConfig.toString(), config.getPropertyAsString("login"));
config.recoverRunningVersion();
assertTrue(config.getProperty("login") instanceof NullProperty);
assertEquals(new NullProperty("login"), config.getProperty("login"));
}
use of org.apache.jmeter.config.ConfigTestElement in project jmeter by apache.
the class SimpleConfigGui method createTestElement.
/* Implements JMeterGUIComponent.createTestElement() */
@Override
public TestElement createTestElement() {
TestElement el = new ConfigTestElement();
modifyTestElement(el);
return el;
}
Aggregations