use of org.killbill.billing.util.dao.DefaultNonEntityDao in project killbill by killbill.
the class TestKillbillJdbcTenantRealm method beforeMethod.
@Override
@BeforeMethod(groups = "slow")
public void beforeMethod() throws Exception {
super.beforeMethod();
// Create the tenant
final DefaultTenantDao tenantDao = new DefaultTenantDao(dbi, clock, cacheControllerDispatcher, new DefaultNonEntityDao(dbi), Mockito.mock(InternalCallContextFactory.class), securityConfig);
tenant = new DefaultTenant(UUID.randomUUID(), null, null, UUID.randomUUID().toString(), UUID.randomUUID().toString(), UUID.randomUUID().toString());
tenantDao.create(new TenantModelDao(tenant), internalCallContext);
// Setup the security manager
final HikariConfig dbConfig = new HikariConfig();
dbConfig.setJdbcUrl(helper.getJdbcConnectionString());
dbConfig.setUsername(helper.getUsername());
dbConfig.setPassword(helper.getPassword());
final KillbillJdbcTenantRealm jdbcRealm = new KillbillJdbcTenantRealm(shiroDataSource, securityConfig);
jdbcRealm.setDataSource(new HikariDataSource(dbConfig));
securityManager = new DefaultSecurityManager(jdbcRealm);
}
Aggregations