Search in sources :

Example 16 with TestBox

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

the class Test_TestBox method testDbUserEmpty.

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

Example 17 with TestBox

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

the class Test_TestBox method testAdminPassEmpty.

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

Example 18 with TestBox

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

the class Test_TestBox method testDbPortTooHigh.

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

Example 19 with TestBox

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

the class Test_TestBox method testHostEmpty.

@Test(expected = NullOrEmptyConfigurationPropertyException.class)
public void testHostEmpty() throws NullOrEmptyConfigurationPropertyException {
    TestBox testBox = new TestBox();
    // test trim too
    testBox.setHost(ONLY_SPACE_STR);
}
Also used : TestBox(com.axway.ats.harness.config.TestBox) BaseTest(com.axway.ats.harness.BaseTest) Test(org.junit.Test)

Example 20 with TestBox

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

the class Test_TestBox method testDbPortNotANumber.

@Test(expected = IllegalArgumentException.class)
public void testDbPortNotANumber() throws IllegalArgumentException {
    TestBox testBox = new TestBox();
    testBox.setDbPort(NOT_A_NUMBER_PORT_STR);
}
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