Java 类org.springframework.boot.autoconfigure.data.elasticsearch.city.CityRepository 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:ElasticsearchRepositoriesAutoConfigurationTests.java   
@Test
public void testDefaultRepositoryConfiguration() throws Exception {
    this.context = new AnnotationConfigApplicationContext();
    addElasticsearchProperties(this.context);
    this.context.register(TestConfiguration.class,
            ElasticsearchAutoConfiguration.class,
            ElasticsearchRepositoriesAutoConfiguration.class,
            ElasticsearchDataAutoConfiguration.class,
            PropertyPlaceholderAutoConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
    assertThat(this.context.getBean(Client.class)).isNotNull();
}
项目:spring-boot-concourse    文件:ElasticsearchRepositoriesAutoConfigurationTests.java   
@Test
public void testDefaultRepositoryConfiguration() throws Exception {
    this.context = new AnnotationConfigApplicationContext();
    addElasticsearchProperties(this.context);
    this.context.register(TestConfiguration.class,
            ElasticsearchAutoConfiguration.class,
            ElasticsearchRepositoriesAutoConfiguration.class,
            ElasticsearchDataAutoConfiguration.class,
            PropertyPlaceholderAutoConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
    assertThat(this.context.getBean(Client.class)).isNotNull();
}
项目:contestparser    文件:ElasticsearchRepositoriesAutoConfigurationTests.java   
@Test
public void testDefaultRepositoryConfiguration() throws Exception {
    this.context = new AnnotationConfigApplicationContext();
    addElasticsearchProperties(this.context);
    this.context.register(TestConfiguration.class,
            ElasticsearchAutoConfiguration.class,
            ElasticsearchRepositoriesAutoConfiguration.class,
            ElasticsearchDataAutoConfiguration.class,
            PropertyPlaceholderAutoConfiguration.class);
    this.context.refresh();
    assertNotNull(this.context.getBean(CityRepository.class));
    assertNotNull(this.context.getBean(Client.class));
}