Search in sources :

Example 11 with TestBox

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

the class Test_CommonConfigurator method testGetTestBoxes.

@Test
public void testGetTestBoxes() {
    CommonConfigurator testDataConfigurator = CommonConfigurator.getInstance();
    testDataConfigurator.registerConfigFile(configFile1.getAbsolutePath());
    List<TestBox> testBoxes = testDataConfigurator.getTestBoxes();
    if (testBoxes == null || testBoxes.size() != 2) {
        throw new AssertionFailedError();
    }
}
Also used : TestBox(com.axway.ats.harness.config.TestBox) CommonConfigurator(com.axway.ats.harness.config.CommonConfigurator) AssertionFailedError(junit.framework.AssertionFailedError) BaseTest(com.axway.ats.harness.BaseTest) Test(org.junit.Test)

Example 12 with TestBox

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

the class Test_TestBox method testDbNameNull.

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

Example 13 with TestBox

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

the class Test_TestBox method testDbUserNull.

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

Example 14 with TestBox

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

the class Test_TestBox method testDbPortNegativeInteger.

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

Example 15 with TestBox

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

the class Test_TestBox method testAdminUserNull.

@Test(expected = NullOrEmptyConfigurationPropertyException.class)
public void testAdminUserNull() throws NullOrEmptyConfigurationPropertyException {
    TestBox testBox = new TestBox();
    testBox.setAdminUser(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