use of com.axway.ats.harness.config.CommonConfigurator in project ats-framework by Axway.
the class Test_CommonConfigurator method mailServerProperties.
@Test
public void mailServerProperties() throws ConfigurationException {
CommonConfigurator testDataConfigurator = CommonConfigurator.getInstance();
testDataConfigurator.registerConfigFile(configFile1.getAbsolutePath());
MailServer mailServer = testDataConfigurator.getMailServer("exchange");
assertEquals(MAILSERVER_HOST, mailServer.getHost());
assertEquals(MAILSERVER_DEFAULTPASS, mailServer.getDefaultPass());
}
use of com.axway.ats.harness.config.CommonConfigurator in project ats-framework by Axway.
the class Test_CommonConfigurator method registerConfigFileFromClasspath.
@Test
public void registerConfigFileFromClasspath() throws ConfigurationException {
CommonConfigurator testDataConfigurator = CommonConfigurator.getInstance();
testDataConfigurator.registerConfigFileFromClasspath("/com/axway/ats/harness/config/resource2.xml");
}
use of com.axway.ats.harness.config.CommonConfigurator in project ats-framework by Axway.
the class Test_CommonConfigurator method testBoxProperties2.
@Test
public void testBoxProperties2() throws ConfigurationException {
CommonConfigurator testDataConfigurator = CommonConfigurator.getInstance();
testDataConfigurator.registerConfigFile(configFile1.getAbsolutePath());
TestBox textbox1 = testDataConfigurator.getTestBox("testbox1");
assertEquals(TEXTBOX1_HOST, textbox1.getHost());
testDataConfigurator.registerConfigFile(configFile2.getAbsolutePath());
textbox1 = testDataConfigurator.getTestBox("testbox1");
assertEquals(TEXTBOX1_HOST2, textbox1.getHost());
testDataConfigurator.setTempProperty("common.testboxes.testbox1.host", "host1");
textbox1 = testDataConfigurator.getTestBox("testbox1");
assertEquals("host1", textbox1.getHost());
testDataConfigurator.clearTempProperties();
textbox1 = testDataConfigurator.getTestBox("testbox1");
assertEquals(TEXTBOX1_HOST2, textbox1.getHost());
}
use of com.axway.ats.harness.config.CommonConfigurator in project ats-framework by Axway.
the class Test_CommonConfigurator method registerConfigFileFromClasspathNegative.
@Test(expected = ConfigSourceDoesNotExistException.class)
public void registerConfigFileFromClasspathNegative() throws ConfigurationException {
CommonConfigurator testDataConfigurator = CommonConfigurator.getInstance();
testDataConfigurator.registerConfigFileFromClasspath("/asdfasdfas");
}
use of com.axway.ats.harness.config.CommonConfigurator in project ats-framework by Axway.
the class Test_CommonConfigurator method registerConfigFile.
@Test
public void registerConfigFile() throws ConfigurationException {
CommonConfigurator testDataConfigurator = CommonConfigurator.getInstance();
testDataConfigurator.registerConfigFile(configFile1.getAbsolutePath());
}
Aggregations