Search in sources :

Example 6 with TaskanaEngineConfiguration

use of pro.taskana.configuration.TaskanaEngineConfiguration in project taskana by Taskana.

the class WorkbasketServiceImplIntAutocommitTest method setup.

@Before
public void setup() throws FileNotFoundException, SQLException, LoginException {
    dataSource = TaskanaEngineConfigurationTest.getDataSource();
    taskanaEngineConfiguration = new TaskanaEngineConfiguration(dataSource, false);
    taskanaEngine = taskanaEngineConfiguration.buildTaskanaEngine();
    taskanaEngineImpl = (TaskanaEngineImpl) taskanaEngine;
    taskanaEngineImpl.setConnectionManagementMode(ConnectionManagementMode.AUTOCOMMIT);
    workBasketService = taskanaEngine.getWorkbasketService();
    DBCleaner cleaner = new DBCleaner();
    cleaner.clearDb(dataSource, false);
    now = Instant.now();
}
Also used : TaskanaEngineConfiguration(pro.taskana.configuration.TaskanaEngineConfiguration) DBCleaner(pro.taskana.impl.configuration.DBCleaner) Before(org.junit.Before)

Example 7 with TaskanaEngineConfiguration

use of pro.taskana.configuration.TaskanaEngineConfiguration in project taskana by Taskana.

the class TaskanaEngineConfigurationTest method testCreateTaskanaEngine.

@Test
public void testCreateTaskanaEngine() throws FileNotFoundException, SQLException, LoginException {
    DataSource ds = getDataSource();
    TaskanaEngineConfiguration taskEngineConfiguration = new TaskanaEngineConfiguration(ds, false);
    TaskanaEngine te = taskEngineConfiguration.buildTaskanaEngine();
    Assert.assertNotNull(te);
}
Also used : TaskanaEngineConfiguration(pro.taskana.configuration.TaskanaEngineConfiguration) TaskanaEngine(pro.taskana.TaskanaEngine) PooledDataSource(org.apache.ibatis.datasource.pooled.PooledDataSource) DataSource(javax.sql.DataSource) Test(org.junit.Test)

Example 8 with TaskanaEngineConfiguration

use of pro.taskana.configuration.TaskanaEngineConfiguration in project taskana by Taskana.

the class WorkbasketServiceImplIntExplicitTest method setup.

@Before
public void setup() throws FileNotFoundException, SQLException, LoginException {
    dataSource = TaskanaEngineConfigurationTest.getDataSource();
    taskanaEngineConfiguration = new TaskanaEngineConfiguration(dataSource, false);
    taskanaEngine = taskanaEngineConfiguration.buildTaskanaEngine();
    taskanaEngineImpl = (TaskanaEngineImpl) taskanaEngine;
    taskanaEngineImpl.setConnectionManagementMode(ConnectionManagementMode.EXPLICIT);
    DBCleaner cleaner = new DBCleaner();
    cleaner.clearDb(dataSource, false);
}
Also used : TaskanaEngineConfiguration(pro.taskana.configuration.TaskanaEngineConfiguration) DBCleaner(pro.taskana.impl.configuration.DBCleaner) Before(org.junit.Before)

Example 9 with TaskanaEngineConfiguration

use of pro.taskana.configuration.TaskanaEngineConfiguration in project taskana by Taskana.

the class ClassificationServiceImplIntExplicitTest method setup.

@Before
public void setup() throws SQLException {
    dataSource = TaskanaEngineConfigurationTest.getDataSource();
    taskanaEngineConfiguration = new TaskanaEngineConfiguration(dataSource, false, false);
    taskanaEngine = taskanaEngineConfiguration.buildTaskanaEngine();
    classificationService = taskanaEngine.getClassificationService();
    taskanaEngineImpl = (TaskanaEngineImpl) taskanaEngine;
    taskanaEngineImpl.setConnectionManagementMode(ConnectionManagementMode.EXPLICIT);
    DBCleaner cleaner = new DBCleaner();
    cleaner.clearDb(dataSource, false);
}
Also used : TaskanaEngineConfiguration(pro.taskana.configuration.TaskanaEngineConfiguration) DBCleaner(pro.taskana.impl.configuration.DBCleaner) Before(org.junit.Before)

Example 10 with TaskanaEngineConfiguration

use of pro.taskana.configuration.TaskanaEngineConfiguration in project taskana by Taskana.

the class TaskServiceImplIntExplicitTest method setup.

@Before
public void setup() throws FileNotFoundException, SQLException, LoginException {
    dataSource = TaskanaEngineConfigurationTest.getDataSource();
    taskanaEngineConfiguration = new TaskanaEngineConfiguration(dataSource, false);
    taskanaEngine = taskanaEngineConfiguration.buildTaskanaEngine();
    taskServiceImpl = (TaskServiceImpl) taskanaEngine.getTaskService();
    taskanaEngineImpl = (TaskanaEngineImpl) taskanaEngine;
    classificationService = taskanaEngine.getClassificationService();
    taskanaEngineImpl.setConnectionManagementMode(ConnectionManagementMode.EXPLICIT);
    workbasketService = taskanaEngine.getWorkbasketService();
    DBCleaner cleaner = new DBCleaner();
    cleaner.clearDb(dataSource, false);
}
Also used : TaskanaEngineConfiguration(pro.taskana.configuration.TaskanaEngineConfiguration) DBCleaner(pro.taskana.impl.configuration.DBCleaner) Before(org.junit.Before)

Aggregations

TaskanaEngineConfiguration (pro.taskana.configuration.TaskanaEngineConfiguration)20 DBCleaner (pro.taskana.impl.configuration.DBCleaner)16 DataSource (javax.sql.DataSource)11 TestDataGenerator (pro.taskana.database.TestDataGenerator)8 Before (org.junit.Before)6 TaskanaEngineImpl (pro.taskana.impl.TaskanaEngineImpl)6 Test (org.junit.Test)5 TaskanaEngineConfigurationTest (pro.taskana.impl.configuration.TaskanaEngineConfigurationTest)4 TaskanaEngine (pro.taskana.TaskanaEngine)3 WithAccessId (pro.taskana.security.WithAccessId)3 Classification (pro.taskana.Classification)2 Task (pro.taskana.Task)2 Workbasket (pro.taskana.Workbasket)2 NotAuthorizedException (pro.taskana.exceptions.NotAuthorizedException)2 ClassificationImpl (pro.taskana.impl.ClassificationImpl)2 TaskImpl (pro.taskana.impl.TaskImpl)2 TaskServiceImpl (pro.taskana.impl.TaskServiceImpl)2 WorkbasketImpl (pro.taskana.impl.WorkbasketImpl)2 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1