Search in sources :

Example 1 with DatabaseDataSourceConnectionFactoryBean

use of com.github.springtestdbunit.bean.DatabaseDataSourceConnectionFactoryBean in project thingsboard by thingsboard.

the class JpaDbunitTestConfig method dbUnitDatabaseConnection.

@Bean(name = "dbUnitDatabaseConnection")
public DatabaseDataSourceConnectionFactoryBean dbUnitDatabaseConnection() throws SQLException, DatabaseUnitException, IOException {
    DatabaseDataSourceConnectionFactoryBean databaseDataSourceConnectionFactoryBean = new DatabaseDataSourceConnectionFactoryBean();
    databaseDataSourceConnectionFactoryBean.setDatabaseConfig(databaseConfigBean());
    databaseDataSourceConnectionFactoryBean.setDataSource(dataSource);
    return databaseDataSourceConnectionFactoryBean;
}
Also used : DatabaseDataSourceConnectionFactoryBean(com.github.springtestdbunit.bean.DatabaseDataSourceConnectionFactoryBean) DatabaseConfigBean(com.github.springtestdbunit.bean.DatabaseConfigBean) Bean(org.springframework.context.annotation.Bean) DatabaseDataSourceConnectionFactoryBean(com.github.springtestdbunit.bean.DatabaseDataSourceConnectionFactoryBean)

Aggregations

DatabaseConfigBean (com.github.springtestdbunit.bean.DatabaseConfigBean)1 DatabaseDataSourceConnectionFactoryBean (com.github.springtestdbunit.bean.DatabaseDataSourceConnectionFactoryBean)1 Bean (org.springframework.context.annotation.Bean)1