Java 类org.springframework.boot.jta.bitronix.PoolingDataSourceBean 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:JtaAutoConfigurationTests.java   
@Test
public void bitronixDataSourcePoolConfiguration() {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.jta.bitronix.datasource.minPoolSize:5",
            "spring.jta.bitronix.datasource.maxPoolSize:10");
    this.context.register(JtaPropertiesConfiguration.class,
            BitronixJtaConfiguration.class, PoolConfiguration.class);
    this.context.refresh();
    PoolingDataSourceBean dataSource = this.context
            .getBean(PoolingDataSourceBean.class);
    assertThat(dataSource.getMinPoolSize()).isEqualTo(5);
    assertThat(dataSource.getMaxPoolSize()).isEqualTo(10);
}
项目:spring-boot-concourse    文件:JtaAutoConfigurationTests.java   
@Test
public void bitronixDataSourcePoolConfiguration() {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.jta.bitronix.datasource.minPoolSize:5",
            "spring.jta.bitronix.datasource.maxPoolSize:10");
    this.context.register(JtaPropertiesConfiguration.class,
            BitronixJtaConfiguration.class, PoolConfiguration.class);
    this.context.refresh();
    PoolingDataSourceBean dataSource = this.context
            .getBean(PoolingDataSourceBean.class);
    assertThat(dataSource.getMinPoolSize()).isEqualTo(5);
    assertThat(dataSource.getMaxPoolSize()).isEqualTo(10);
}
项目:contestparser    文件:JtaAutoConfigurationTests.java   
@Test
public void bitronixDataSourcePoolConfiguration() {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.jta.bitronix.datasource.minPoolSize:5",
            "spring.jta.bitronix.datasource.maxPoolSize:10");
    this.context.register(JtaPropertiesConfiguration.class,
            BitronixJtaConfiguration.class, PoolConfiguration.class);
    this.context.refresh();
    PoolingDataSourceBean dataSource = this.context
            .getBean(PoolingDataSourceBean.class);
    assertThat(dataSource.getMinPoolSize(), is(equalTo(5)));
    assertThat(dataSource.getMaxPoolSize(), is(equalTo(10)));
}