Search in sources :

Example 6 with DbConnMySQL

use of com.axway.ats.core.dbaccess.mysql.DbConnMySQL 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)

Example 7 with DbConnMySQL

use of com.axway.ats.core.dbaccess.mysql.DbConnMySQL in project ats-framework by Axway.

the class MockDbEnvironmentUnit method getTestComponent.

private Component getTestComponent() {
    Component testComponent = new Component(COMPONENT_NAME);
    Map<String, Object> customProperties = new HashMap<String, Object>();
    customProperties.put(DbKeys.PORT_KEY, 3306);
    List<EnvironmentUnit> environmentUnits = new ArrayList<EnvironmentUnit>();
    environmentUnits.add(new MockDbEnvironmentUnit(new DbConnMySQL("host_1", "db_1", "user_1", "password_1", customProperties)));
    testComponent.setEnvironments(Arrays.asList(new ComponentEnvironment(COMPONENT_NAME, null, environmentUnits, "backupFolder")));
    return testComponent;
}
Also used : ComponentEnvironment(com.axway.ats.agent.core.ComponentEnvironment) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) DbConnMySQL(com.axway.ats.core.dbaccess.mysql.DbConnMySQL) EnvironmentUnit(com.axway.ats.environment.EnvironmentUnit) DatabaseEnvironmentUnit(com.axway.ats.environment.database.DatabaseEnvironmentUnit) Component(com.axway.ats.agent.core.Component)

Aggregations

DbConnMySQL (com.axway.ats.core.dbaccess.mysql.DbConnMySQL)7 Test (org.junit.Test)4 DbConnOracle (com.axway.ats.core.dbaccess.oracle.DbConnOracle)3 BaseTest (com.axway.ats.core.BaseTest)2 MysqlDbProvider (com.axway.ats.core.dbaccess.mysql.MysqlDbProvider)2 BaseTest (com.axway.ats.environment.BaseTest)2 EnvironmentHandlerFactory (com.axway.ats.environment.database.EnvironmentHandlerFactory)2 HashMap (java.util.HashMap)2 PackageException (com.axway.ats.action.objects.model.PackageException)1 Component (com.axway.ats.agent.core.Component)1 ComponentEnvironment (com.axway.ats.agent.core.ComponentEnvironment)1 CassandraDbProvider (com.axway.ats.core.dbaccess.cassandra.CassandraDbProvider)1 DbConnCassandra (com.axway.ats.core.dbaccess.cassandra.DbConnCassandra)1 DbException (com.axway.ats.core.dbaccess.exceptions.DbException)1 DbRecordsException (com.axway.ats.core.dbaccess.exceptions.DbRecordsException)1 DbConnSQLServer (com.axway.ats.core.dbaccess.mssql.DbConnSQLServer)1 MssqlDbProvider (com.axway.ats.core.dbaccess.mssql.MssqlDbProvider)1 OracleDbProvider (com.axway.ats.core.dbaccess.oracle.OracleDbProvider)1 EnvironmentUnit (com.axway.ats.environment.EnvironmentUnit)1 DatabaseEnvironmentUnit (com.axway.ats.environment.database.DatabaseEnvironmentUnit)1