Search in sources :

Example 6 with TaskanaEngineImpl

use of pro.taskana.impl.TaskanaEngineImpl in project taskana by Taskana.

the class GetTaskIdsOfCategoryReportAccTest method resetDb.

public static void resetDb() throws SQLException, IOException {
    DataSource dataSource = TaskanaEngineConfigurationTest.getDataSource();
    DBCleaner cleaner = new DBCleaner();
    cleaner.clearDb(dataSource, true);
    dataSource = TaskanaEngineConfigurationTest.getDataSource();
    taskanaEngineConfiguration = new TaskanaEngineConfiguration(dataSource, false);
    taskanaEngineConfiguration.setGermanPublicHolidaysEnabled(false);
    taskanaEngine = taskanaEngineConfiguration.buildTaskanaEngine();
    ((TaskanaEngineImpl) taskanaEngine).setConnectionManagementMode(ConnectionManagementMode.AUTOCOMMIT);
    cleaner.clearDb(dataSource, false);
    TestDataGenerator testDataGenerator = new TestDataGenerator();
    testDataGenerator.generateMonitoringTestData(dataSource);
}
Also used : TaskanaEngineConfiguration(pro.taskana.configuration.TaskanaEngineConfiguration) TaskanaEngineImpl(pro.taskana.impl.TaskanaEngineImpl) DBCleaner(pro.taskana.impl.configuration.DBCleaner) DataSource(javax.sql.DataSource) TestDataGenerator(pro.taskana.database.TestDataGenerator)

Example 7 with TaskanaEngineImpl

use of pro.taskana.impl.TaskanaEngineImpl in project taskana by Taskana.

the class ProvideClassificationReportAccTest method resetDb.

public static void resetDb() throws SQLException, IOException {
    DataSource dataSource = TaskanaEngineConfigurationTest.getDataSource();
    DBCleaner cleaner = new DBCleaner();
    cleaner.clearDb(dataSource, true);
    dataSource = TaskanaEngineConfigurationTest.getDataSource();
    taskanaEngineConfiguration = new TaskanaEngineConfiguration(dataSource, false);
    taskanaEngineConfiguration.setGermanPublicHolidaysEnabled(false);
    taskanaEngine = taskanaEngineConfiguration.buildTaskanaEngine();
    ((TaskanaEngineImpl) taskanaEngine).setConnectionManagementMode(ConnectionManagementMode.AUTOCOMMIT);
    cleaner.clearDb(dataSource, false);
    TestDataGenerator testDataGenerator = new TestDataGenerator();
    testDataGenerator.generateMonitoringTestData(dataSource);
}
Also used : TaskanaEngineConfiguration(pro.taskana.configuration.TaskanaEngineConfiguration) TaskanaEngineImpl(pro.taskana.impl.TaskanaEngineImpl) DBCleaner(pro.taskana.impl.configuration.DBCleaner) DataSource(javax.sql.DataSource) TestDataGenerator(pro.taskana.database.TestDataGenerator)

Example 8 with TaskanaEngineImpl

use of pro.taskana.impl.TaskanaEngineImpl in project taskana by Taskana.

the class ProvideDetailedClassificationReportAccTest method resetDb.

public static void resetDb() throws SQLException, IOException {
    DataSource dataSource = TaskanaEngineConfigurationTest.getDataSource();
    DBCleaner cleaner = new DBCleaner();
    cleaner.clearDb(dataSource, true);
    dataSource = TaskanaEngineConfigurationTest.getDataSource();
    taskanaEngineConfiguration = new TaskanaEngineConfiguration(dataSource, false);
    taskanaEngineConfiguration.setGermanPublicHolidaysEnabled(false);
    taskanaEngine = taskanaEngineConfiguration.buildTaskanaEngine();
    ((TaskanaEngineImpl) taskanaEngine).setConnectionManagementMode(ConnectionManagementMode.AUTOCOMMIT);
    cleaner.clearDb(dataSource, false);
    TestDataGenerator testDataGenerator = new TestDataGenerator();
    testDataGenerator.generateMonitoringTestData(dataSource);
}
Also used : TaskanaEngineConfiguration(pro.taskana.configuration.TaskanaEngineConfiguration) TaskanaEngineImpl(pro.taskana.impl.TaskanaEngineImpl) DBCleaner(pro.taskana.impl.configuration.DBCleaner) DataSource(javax.sql.DataSource) TestDataGenerator(pro.taskana.database.TestDataGenerator)

Aggregations

TaskanaEngineImpl (pro.taskana.impl.TaskanaEngineImpl)8 TaskanaEngineConfiguration (pro.taskana.configuration.TaskanaEngineConfiguration)6 DBCleaner (pro.taskana.impl.configuration.DBCleaner)6 DataSource (javax.sql.DataSource)5 TestDataGenerator (pro.taskana.database.TestDataGenerator)5 Test (org.junit.Test)3 Classification (pro.taskana.Classification)3 TaskServiceImpl (pro.taskana.impl.TaskServiceImpl)3 TaskanaEngineConfigurationTest (pro.taskana.impl.configuration.TaskanaEngineConfigurationTest)3 Task (pro.taskana.Task)2 Workbasket (pro.taskana.Workbasket)2 Connection (java.sql.Connection)1 TaskanaEngine (pro.taskana.TaskanaEngine)1 TaskImpl (pro.taskana.impl.TaskImpl)1 WorkbasketImpl (pro.taskana.impl.WorkbasketImpl)1 WithAccessId (pro.taskana.security.WithAccessId)1