Search in sources :

Example 1 with EnvironmentHandlerFactory

use of com.axway.ats.environment.database.EnvironmentHandlerFactory in project ats-framework by Axway.

the class Test_EnvrionmentHandlerFactory method createDbRestoreHandlerPositive.

@Test
public void createDbRestoreHandlerPositive() {
    EnvironmentHandlerFactory factory = EnvironmentHandlerFactory.getInstance();
    assertEquals(MysqlEnvironmentHandler.class, factory.createDbRestoreHandler(new DbConnMySQL("host", "db", "user", "pass")).getClass());
    assertEquals(OracleEnvironmentHandler.class, factory.createDbRestoreHandler(new DbConnOracle("host", "db", "user", "pass")).getClass());
}
Also used : EnvironmentHandlerFactory(com.axway.ats.environment.database.EnvironmentHandlerFactory) DbConnMySQL(com.axway.ats.core.dbaccess.mysql.DbConnMySQL) DbConnOracle(com.axway.ats.core.dbaccess.oracle.DbConnOracle) BaseTest(com.axway.ats.environment.BaseTest) Test(org.junit.Test)

Example 2 with EnvironmentHandlerFactory

use of com.axway.ats.environment.database.EnvironmentHandlerFactory in project ats-framework by Axway.

the class Test_EnvrionmentHandlerFactory method createDbBackupHandlerPositive.

@Test
public void createDbBackupHandlerPositive() {
    EnvironmentHandlerFactory factory = EnvironmentHandlerFactory.getInstance();
    assertEquals(MysqlEnvironmentHandler.class, factory.createDbBackupHandler(new DbConnMySQL("host", "db", "user", "pass")).getClass());
    assertEquals(OracleEnvironmentHandler.class, factory.createDbBackupHandler(new DbConnOracle("host", "db", "user", "pass")).getClass());
}
Also used : EnvironmentHandlerFactory(com.axway.ats.environment.database.EnvironmentHandlerFactory) DbConnMySQL(com.axway.ats.core.dbaccess.mysql.DbConnMySQL) DbConnOracle(com.axway.ats.core.dbaccess.oracle.DbConnOracle) BaseTest(com.axway.ats.environment.BaseTest) Test(org.junit.Test)

Aggregations

DbConnMySQL (com.axway.ats.core.dbaccess.mysql.DbConnMySQL)2 DbConnOracle (com.axway.ats.core.dbaccess.oracle.DbConnOracle)2 BaseTest (com.axway.ats.environment.BaseTest)2 EnvironmentHandlerFactory (com.axway.ats.environment.database.EnvironmentHandlerFactory)2 Test (org.junit.Test)2