use of com.axway.ats.harness.config.CommonConfigurator in project ats-framework by Axway.
the class Test_CommonConfigurator method testBoxNegative.
@Test(expected = ConfigurationException.class)
public void testBoxNegative() throws ConfigurationException {
CommonConfigurator testDataConfigurator = CommonConfigurator.getInstance();
testDataConfigurator.registerConfigFile(configFile1.getAbsolutePath());
testDataConfigurator.getTestBox("INVALID_TEST_BOX");
}
use of com.axway.ats.harness.config.CommonConfigurator in project ats-framework by Axway.
the class Test_CommonConfigurator method unknownProperty.
@Test
public void unknownProperty() throws ConfigurationException {
CommonConfigurator testDataConfigurator = CommonConfigurator.getInstance();
testDataConfigurator.registerConfigFile(unknownPropertyConfigFile.getAbsolutePath());
ConfigurationRepository.getInstance();
TestBox testboxUnknownProperty = testDataConfigurator.getTestBox("testboxUnknownProperty");
assertEquals("value1", testboxUnknownProperty.getProperty("someUnknownProperty"));
}
use of com.axway.ats.harness.config.CommonConfigurator in project ats-framework by Axway.
the class Test_CommonConfigurator method testBoxProperties.
@Test
public void testBoxProperties() throws ConfigurationException {
CommonConfigurator testDataConfigurator = CommonConfigurator.getInstance();
testDataConfigurator.registerConfigFile(configFile1.getAbsolutePath());
TestBox textbox1 = testDataConfigurator.getTestBox("testbox1");
TestBox textbox2 = testDataConfigurator.getTestBox("testbox2");
assertEquals(TEXTBOX1_HOST, textbox1.getHost());
assertEquals(TEXTBOX1_DBPORT, textbox1.getDbPort());
assertEquals(TEXTBOX1_ADMINPASS, textbox1.getAdminPass());
assertEquals(TEXTBOX1_DBNAME, textbox1.getDbName());
assertEquals(TEXTBOX1_DBUSER, textbox1.getDbUser());
assertEquals(TEXTBOX1_DBPASS, textbox1.getDbPass());
assertEquals(TEXTBOX1_DBTYPE.toLowerCase(), textbox1.getDbType().toString().toLowerCase());
assertEquals(TEXTBOX2_HOST, textbox2.getHost());
assertEquals(TEXTBOX2_ADMINUSER, textbox2.getAdminUser());
}
use of com.axway.ats.harness.config.CommonConfigurator in project ats-framework by Axway.
the class Test_CommonConfigurator method messageBoxProperties.
@Test
public void messageBoxProperties() throws ConfigurationException {
CommonConfigurator testDataConfigurator = CommonConfigurator.getInstance();
testDataConfigurator.registerConfigFile(configFile1.getAbsolutePath());
MessagesBox msgBox = testDataConfigurator.getMessagesBox("axway");
assertEquals(MESSAGEBOX_HOST, msgBox.getHost());
assertEquals(MESSAGEBOX_DBNAME, msgBox.getDbName());
assertEquals(MESSAGEBOX_DBUSER, msgBox.getDbUser());
assertEquals(MESSAGEBOX_DBPASS, msgBox.getDbPass());
assertEquals(MESSAGEBOX_DBTABLE, msgBox.getDbTable());
}
use of com.axway.ats.harness.config.CommonConfigurator in project ats-framework by Axway.
the class Test_CommonConfigurator method nullProperty.
@Test(expected = ConfigurationException.class)
public void nullProperty() throws ConfigurationException {
CommonConfigurator testDataConfigurator = CommonConfigurator.getInstance();
testDataConfigurator.registerConfigFile(nullPropertyConfigFile.getAbsolutePath());
}
Aggregations