Search in sources :

Example 11 with CommonConfigurator

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

the class Test_CommonConfigurator method messageBoxNegative.

@Test(expected = ConfigurationException.class)
public void messageBoxNegative() throws ConfigurationException {
    CommonConfigurator testDataConfigurator = CommonConfigurator.getInstance();
    testDataConfigurator.registerConfigFile(configFile1.getAbsolutePath());
    testDataConfigurator.getMessagesBox("INVALID_MESSAGE_BOX");
}
Also used : CommonConfigurator(com.axway.ats.harness.config.CommonConfigurator) BaseTest(com.axway.ats.harness.BaseTest) Test(org.junit.Test)

Example 12 with CommonConfigurator

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

the class Test_CommonConfigurator method registerConfigFileNegative.

@Test(expected = ConfigSourceDoesNotExistException.class)
public void registerConfigFileNegative() throws ConfigurationException {
    CommonConfigurator testDataConfigurator = CommonConfigurator.getInstance();
    testDataConfigurator.registerConfigFile("dasdasd");
}
Also used : CommonConfigurator(com.axway.ats.harness.config.CommonConfigurator) BaseTest(com.axway.ats.harness.BaseTest) Test(org.junit.Test)

Example 13 with CommonConfigurator

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

the class Test_CommonConfigurator method mailServerNegative.

@Test(expected = ConfigurationException.class)
public void mailServerNegative() throws ConfigurationException {
    CommonConfigurator testDataConfigurator = CommonConfigurator.getInstance();
    testDataConfigurator.registerConfigFile(configFile1.getAbsolutePath());
    testDataConfigurator.getMailServer("INVALID_MAIL_SERVER");
}
Also used : CommonConfigurator(com.axway.ats.harness.config.CommonConfigurator) BaseTest(com.axway.ats.harness.BaseTest) Test(org.junit.Test)

Example 14 with CommonConfigurator

use of com.axway.ats.harness.config.CommonConfigurator 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)

Aggregations

BaseTest (com.axway.ats.harness.BaseTest)14 CommonConfigurator (com.axway.ats.harness.config.CommonConfigurator)14 Test (org.junit.Test)14 TestBox (com.axway.ats.harness.config.TestBox)4 MailServer (com.axway.ats.harness.config.MailServer)1 MessagesBox (com.axway.ats.harness.config.MessagesBox)1 AssertionFailedError (junit.framework.AssertionFailedError)1