Package pro.taskana.common.test.config
Class TaskanaEngineTestConfiguration
- java.lang.Object
-
- pro.taskana.common.test.config.TaskanaEngineTestConfiguration
-
public final class TaskanaEngineTestConfiguration extends Object
Integration Test for TaskanaEngineConfiguration.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DataSourcecreateDataSourceFromProperties(String propertiesFileName)create data source from properties file.static DataSourcegetDataSource()returns the Datasource used for Junit test.static StringgetSchemaName()returns the SchemaName used for Junit test.
-
-
-
Method Detail
-
getDataSource
public static DataSource getDataSource()
returns the Datasource used for Junit test. If the file {user.home}/taskanaUnitTest.properties is present, the Datasource is created according to the properties jdbcDriver, jdbcUrl, dbUserName and dbPassword. Assuming, the database has the name tskdb, a sample properties file for DB2 looks as follows: jdbcDriver=com.ibm.db2.jcc.DB2Driver jdbcUrl=jdbc:db2://localhost:50000/tskdb dbUserName=db2user dbPassword=db2password If any of these properties is missing, or the file doesn't exist, the default Datasource for h2 in-memory db is created.- Returns:
- dataSource for unit test
-
getSchemaName
public static String getSchemaName()
returns the SchemaName used for Junit test. If the file {user.home}/taskanaUnitTest.properties is present, the SchemaName is created according to the property schemaName. a sample properties file for DB2 looks as follows: jdbcDriver=com.ibm.db2.jcc.DB2Driver jdbcUrl=jdbc:db2://localhost:50000/tskdb dbUserName=db2user dbPassword=db2password schemaName=TASKANA If any of these properties is missing, or the file doesn't exist, the default schemaName TASKANA is created used.- Returns:
- String for unit test
-
createDataSourceFromProperties
public static DataSource createDataSourceFromProperties(String propertiesFileName)
create data source from properties file.- Parameters:
propertiesFileName- the name of the property file- Returns:
- the parsed datasource.
-
-