Search in sources :

Example 1 with TestBox

use of com.axway.ats.harness.config.TestBox 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"));
}
Also used : TestBox(com.axway.ats.harness.config.TestBox) CommonConfigurator(com.axway.ats.harness.config.CommonConfigurator) BaseTest(com.axway.ats.harness.BaseTest) Test(org.junit.Test)

Example 2 with TestBox

use of com.axway.ats.harness.config.TestBox in project ats-framework by Axway.

the class Test_TestBox method testDbPassEmpty.

// Code expects not null. Possible misbehavior - why pass should not be null
@Test(expected = NullOrEmptyConfigurationPropertyException.class)
public void testDbPassEmpty() throws NullOrEmptyConfigurationPropertyException {
    TestBox testBox = new TestBox();
    testBox.setDbPass(ONLY_SPACE_STR);
}
Also used : TestBox(com.axway.ats.harness.config.TestBox) BaseTest(com.axway.ats.harness.BaseTest) Test(org.junit.Test)

Example 3 with TestBox

use of com.axway.ats.harness.config.TestBox in project ats-framework by Axway.

the class Test_TestBox method testDbPortNull.

@Test(expected = NullOrEmptyConfigurationPropertyException.class)
public void testDbPortNull() throws NullOrEmptyConfigurationPropertyException {
    TestBox testBox = new TestBox();
    testBox.setDbPort(null);
}
Also used : TestBox(com.axway.ats.harness.config.TestBox) BaseTest(com.axway.ats.harness.BaseTest) Test(org.junit.Test)

Example 4 with TestBox

use of com.axway.ats.harness.config.TestBox in project ats-framework by Axway.

the class Test_TestBox method testHostNull.

@Test(expected = NullOrEmptyConfigurationPropertyException.class)
public void testHostNull() throws NullOrEmptyConfigurationPropertyException {
    TestBox testBox = new TestBox();
    testBox.setHost(null);
}
Also used : TestBox(com.axway.ats.harness.config.TestBox) BaseTest(com.axway.ats.harness.BaseTest) Test(org.junit.Test)

Example 5 with TestBox

use of com.axway.ats.harness.config.TestBox in project ats-framework by Axway.

the class Test_TestBox method testDbTypeNull.

@Test(expected = NullOrEmptyConfigurationPropertyException.class)
public void testDbTypeNull() throws NullOrEmptyConfigurationPropertyException {
    TestBox testBox = new TestBox();
    testBox.setDbType(null);
}
Also used : TestBox(com.axway.ats.harness.config.TestBox) BaseTest(com.axway.ats.harness.BaseTest) Test(org.junit.Test)

Aggregations

TestBox (com.axway.ats.harness.config.TestBox)24 BaseTest (com.axway.ats.harness.BaseTest)21 Test (org.junit.Test)21 CommonConfigurator (com.axway.ats.harness.config.CommonConfigurator)4 DatabaseOperations (com.axway.ats.action.dbaccess.DatabaseOperations)3 BeforeMethod (org.testng.annotations.BeforeMethod)2 DbConnPostgreSQL (com.axway.ats.core.dbaccess.postgresql.DbConnPostgreSQL)1 DbTable (com.axway.ats.environment.database.model.DbTable)1 DbVerification (com.axway.ats.rbv.clients.DbVerification)1 AssertionFailedError (junit.framework.AssertionFailedError)1